7
$\begingroup$

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: enter image description here . 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.

$\endgroup$
5
  • 1
    $\begingroup$ And here with the same input: `\&\$\#_\{\}`. Screenshot $\endgroup$ Feb 16, 2022 at 14:49
  • 4
    $\begingroup$ This seems right. Mathjax and markdown have confusing compatibility problems, and I can imagine this would be a surprisingly annoying thing to try to work out. $\endgroup$
    – davidlowryduda Mod
    Feb 16, 2022 at 17:47
  • $\begingroup$ You can type them in comments, but they can be difficult. I think sufficient spaces after them renders them visible: \ &$\ #_ 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$ Feb 16, 2022 at 21:47
  • 2
    $\begingroup$ I think the problem is that final \` which gets interpreted as an escape character. Add a space between the backslash and the quote mark and it seems to work. $\endgroup$ Feb 16, 2022 at 22:02
  • 1
    $\begingroup$ Indeed. Also note that your comment does not display \\\$ when you typed \$, ie the \$ bug does not repro in comments (hence ‘inconsistency’ in title) $\endgroup$ Feb 17, 2022 at 1:18

0

You must log in to answer this question.

Browse other questions tagged .