I agree the code block approach would be less ambiguous, but there is an advantage in going where people already are.
I agree the code block approach would be less ambiguous, but there is an advantage in going where people already are.
In my opinion the familiarity of $ and $$ is sacrificing a lot for not much benefit.
As an example for math/equations, inline math is stem:[sqrt(4)], which defaults to AciiMath, but can be changed with a page attribute. To specify inline, LaTeX is latexmath:[\sqrt(2)] and AciiMath is asciimath:[sqrt(2)].
For blocks (which you can replace stem with either latexmath or asciimath to specify),
[stem] ++++ sqrt(2) ++++
It's certainly not perfect, but I much prefer it for the flexibility and consistency to the dozens of markdown implementations that all do things a little different and not needing to drop down into HTML when I need to do something just outside of markdown's capabilities.
I've been a managing editor for scientific journals for a number of years, and I can tell that -- while $ is still popular -- (almost) nobody uses $$ anymore. So I wouldn't say this is "where people already are".