There is an inconsistency between the Markdown for codeblocks in comments and the Markdown in Questions and Answers: it seems to me impossible to type \
(as in, literally a backslash in a codeblock alone) in a comment. I think this is in contradiction with the spec of CommonMark which SE now implements.
I discovered this about the same time I rediscovered with TheAmplitwist an already reported bug on \\$ in codeblocks that makes item 15 in the Question body of MathJax basic tutorial and quick reference display wrongly.1
A long time ago, comments were set to use a restricted version of Markdown; I guess this has not been updated, because one cannot reproduce the \\$ bug in the comments. The combination of the two bugs made discussing them a little confusing.
As the \\$ bug is Mathjax-related, I am posting here instead of meta.SE (first?) in case this bug is also Mathjax related. (I don't know if I can post `test' comments on meta.SE.)
I'll post a comment below to illustrate the bug with the input: . For comparison, the result in a Question is:
\&\\\$\#\_\{\}\
(screenshot). Note the reproduction of the \\$ bug.
1 Given that the optimal solution (\\$ bug fix) hasn't come. I think its better to have the correct instruction displayed in the Mathjax tutorial (\&
\\$\#\_\{\}
) instead of what "should be" correct (\&\\\$\#\_\{\}
), but perhaps this should be discussed in a separate math.meta post.
\ &$\ #_
with two spaces after each backslash. And\ $#\
with one space. A space before the final quote mark works:\$#\
but without the space it seems to interpret the backslash as an escape character for the backquote:\$#` and does not leave the mode until another `
. $\endgroup$\`
which gets interpreted as an escape character. Add a space between the backslash and the quote mark and it seems to work. $\endgroup$\\\$
when you typed\$
, ie the \$ bug does not repro in comments (hence ‘inconsistency’ in title) $\endgroup$