2

Possible Duplicate:
How do you type a single backslash, code-formatted, in a comment?

I was trying to get a \ in a comment and couldn't do it... (To be clear, I mean a single backslash code-highlighted)

using apostrophes to demo...

  • '\' resulted in ''
  • '\\' resulted in '\'

Either I'm missing something or this is a bug in the parsing... Is it possible with syntax I'm not familiar with?

2
  • It seems to work when you add an extra space at the end - \ in comparison - \ \
    – Lix
    Commented Sep 1, 2012 at 20:21
  • 1
    @Lix Thanks - You wouldn't believe how many comments have been posted and deleted on here in the last 5 mins lol. If you'd care to post that as an answer, I'll vote up. I'll leave this open a little while as I'd argue it should work without the space
    – Basic
    Commented Sep 1, 2012 at 20:23

1 Answer 1

1

So there are two ways I can see to get this to work.

1. Extra space

Add an extra space between the backticks

`\ `

2. Zero width character -

Add a zero width non printable character between the backticks

`\​`

Since this non printable character is...well.. non printable it's hard to give it to you here - you'll just have to trust me when I tell you it's between these brackets - (​)

3
  • Method 1 - \ , regular \
    – Lix
    Commented Sep 1, 2012 at 20:27
  • Method 2 - \​, regular \
    – Lix
    Commented Sep 1, 2012 at 20:27
  • 1
    Thanks - and again for demoing using a \ to escape ` in code in a post - that's new to me too
    – Basic
    Commented Sep 1, 2012 at 20:29

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