Skip to main content
2 of 2
Link to another comment
LSpice
  • 12.9k
  • 19
  • 25

How do backticks, escaped backticks, and math mode interact, in posts and comments?

I know I can escape backticks, like `.

I though I could escape backticks within backticks, as I did in a comment, but it's not working here: a\b`. See a comment where it does happen.

Backticks in math mode work if there are no other backticks in the paragraph (although it took a really long time to render as I was editing): $\sigma`(C \setminus A)$.

Single backticks in math mode do not work if there are other backticks in the paragraph: $\sigma`(C \setminus A)$ backticks. (Wait, when I first posted this, the backtick inside math mode and the first backtick outside matched. After edit, they do not. The more data I gather, the more confused I am.)

Escaping creates an error: $\sigma\`(C \setminus A)$ backticks. This is the same as behaviour in comments here, but is not the behaviour I observed on main.

This is baffling to me! Is there any guide to what's going on (other than reading the parser source code)?

LSpice
  • 12.9k
  • 19
  • 25