11

Test one

The test is to render a backslash in code block:
Transcript:

....\\....\(KKK\)

Rendering

\\\(KKK\)

Test two

The test is to render a backslash in `backquotes`
Transcript

`\\\`..
`\(KKK\)`

Rendering:
\\\
\(KKK\)

Now performing the same in the comments (see below) and the rendering is different.

ps. In transcript . means <space>

  • Test one: \\ (KKKK) – Dima Jul 29 '10 at 15:56
  • Test two: \\` (KKK)` – Dima Jul 29 '10 at 15:57
  • Test two part two only: \(KKK\) – Dima Jul 29 '10 at 15:58
  • Test two part one only: `\\` – Dima Jul 29 '10 at 15:58
  • Added additional comment to the meta.so.com meta.stackexchange.com/questions/11388/… – Dima Jul 31 '10 at 13:35
  • For formatting of backticks and backslashes in posts, see the Formatting Sand-Box. Also, see this comment for comment-related formatting of the symbols. – Werner Jun 4 '13 at 18:24
4

So is it different in comments and answers? If I do

`\( ... \)`

then it works as I expect: \( .. \).


Edit: Okay! So that's an inconsistency between the two and I'd rate that a bug.

  • So let's try in a comment: \( .. \). – Loop Space Jul 29 '10 at 11:34
  • See? Now it works, even in old comments! – Hendrik Vogt Feb 20 '11 at 21:26
  • Single backslash inside tick marks: `` – Solomon Ucko Dec 30 '18 at 14:44
  • Double backslash: `\` – Solomon Ucko Dec 30 '18 at 14:44
  • Triple backslash: `\\` – Solomon Ucko Dec 30 '18 at 14:44
  • Quadruple backslash: `\\\` – Solomon Ucko Dec 30 '18 at 14:44
  • 5 backslashes: `\\\\` – Solomon Ucko Dec 30 '18 at 14:44
  • What about empty backticks? `` – Solomon Ucko Dec 30 '18 at 14:46
  • What if I add spaces? No backslash (backtick-space-space-backtick): ` ` – Solomon Ucko Dec 30 '18 at 14:47
  • Do spaces collapse? (1 space, "1", 2 spaces, "2", 3 spaces, "3", 4 spaces) ` 1 2 3 ` – Solomon Ucko Dec 30 '18 at 14:48
  • Why are they not working? abc – Solomon Ucko Dec 30 '18 at 14:49
  • 5 spaces in the middle: before after – Solomon Ucko Dec 30 '18 at 14:49
  • Any way to get multiple spaces? What about backtick-"before"-2 spaces-backslash-2 spaces-"after"-backtick? before \ after – Solomon Ucko Dec 30 '18 at 14:50
  • What about alternating letters and backticks? Backtick on both ends: abcdefgh` – Solomon Ucko Dec 30 '18 at 14:52
  • What if I use non-breaking spaces? "a", 3 NBSPs, "b": a b – Solomon Ucko Dec 30 '18 at 14:58
4

That's part of the Markdown syntax, personally I'm not thrilled about it either (specially within backticks), but that's how it's documented.

Incidentally, I was just writing a comment and it took me ages to figure out how is one supposed to enter a coded line-break.

Here \\ works.

Here `\\` works

But on a comment I had to type

On a comment `\\ `, because `\\` doesn't work!

inconsistent and not practical at all!

  • On a comment \\ , because `\` doesn't work! – Juan A. Navarro Jul 29 '10 at 12:00
  • Well, the documentation also talks about backslash escapes for {, but this isn't in effect in inline code in comments. – Hendrik Vogt Jan 24 '11 at 18:12
4

I had exactly the same problem in a comment to this answer to a question of mine, and it's a real pain. Is there any hope that this bug gets fixed in the near future? (I know that answers are not really a place to ask questions, but my aim is just to give the original post here some more emphasis.)


This now got implemented as follows: Backslash escaping in inline code in comments is disabled, except for a backtick ` within single backticks `...`. For the two examples: ``\\\`` gives \\\, and `\(KKK\)` gives \(KKK\) (note that there are no line breaks and hence no code blocks in comments). For details have a look here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .