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>

6
  • Test one: \\ (KKKK)
    – Dima
    Jul 29, 2010 at 15:56
  • Test two: \\` (KKK)`
    – Dima
    Jul 29, 2010 at 15:57
  • Test two part two only: \(KKK\)
    – Dima
    Jul 29, 2010 at 15:58
  • Test two part one only: `\\`
    – Dima
    Jul 29, 2010 at 15:58
  • Added additional comment to the meta.so.com meta.stackexchange.com/questions/11388/…
    – Dima
    Jul 31, 2010 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 Mod
    Jun 4, 2013 at 18:24

3 Answers 3

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.

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

2
  • On a comment \\ , because `\` doesn't work! Jul 29, 2010 at 12:00
  • Well, the documentation also talks about backslash escapes for {, but this isn't in effect in inline code in comments. Jan 24, 2011 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.

0

You must log in to answer this question.

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