This is at least an option:
s = raw" # Hello ```math \begin{bmatrix} a \end{bmatrix} ``` " Markdown.parse(s)