I know there are several open issues regarding $ but I didn't see this particular one mentioned.
Context
The issue relates to what Pandoc documentation calls display math:
For display math, use $$ delimiters. (In this case, the delimiters may be separated from the formula by whitespace.)
Problem
If the equation is separated from both sides by newlines, then the syntax works just fine:
However, if the newline is gone on either side (or both), then the syntax for the rest of the file breaks (note no bold font; other things are broken, too):
Note that it must be newlines, e.g., spaces around the equation don't fix it.
Workaround
Clearly, the workaround is to simply place $$ in separate lines, so it's not that big of a deal. But since the pandoc docs say it "may" be separated, and there's no mention of newlines, it could break some markdown documents that already exist. Plus, it wasn't clear to me why my syntax broke for a while until I noticed what was going on.
I know there are several open issues regarding $ but I didn't see this particular one mentioned.
Context
The issue relates to what Pandoc documentation calls display math:
Problem
If the equation is separated from both sides by newlines, then the syntax works just fine:
However, if the newline is gone on either side (or both), then the syntax for the rest of the file breaks (note no bold font; other things are broken, too):
Note that it must be newlines, e.g., spaces around the equation don't fix it.
Workaround
Clearly, the workaround is to simply place
$$
in separate lines, so it's not that big of a deal. But since the pandoc docs say it "may" be separated, and there's no mention of newlines, it could break some markdown documents that already exist. Plus, it wasn't clear to me why my syntax broke for a while until I noticed what was going on.