Seems like a reasonable change to the recent comment markup. Instead of relying on Jeff's regexp to be perfect and only match things that need to be italicized, bolded or in code, why not include the ability to make sure we can show those characters when we need to but the unthinkable happens. The unthinkable being, of course, a false positive by the perfect regexp.

  • this is just a *test* Jul 11 '09 at 18:44
  • It's a pain talking about objective-c in comments. Escaping @ with \ yields \@this. But does it work with @backticks? Why \@yes it @does! Dec 2 '11 at 6:55

The problem, regex..

I completely agree, it would be nice to be able to escape the markdown characters using backslashes, this would be consistent with the markdown used in the posts, where you can do \*this\* -> *this*

The obvious workaround is to use the inline code-blocks.. Surround the bits you don't want to be bold/italic in backticks `

Something `*like this*`

..which will display in a comment as:

Something *like this*
  • Using the code backticks is an acceptable workaround, but what do you mean by saying regex is a problem? If anything, a nicely defined escape character like \ would make the regex simpler; only match special characters that don't have a preceding \, and treat \ without a following special character normally. So * would be \*, \* could be \\*, and if you want to italicize blah `, well, you'd have to do *blah \ *`. Still better than no escape at all, IMHO. It would also be less likely to break pre-markup comments.
    – Sean
    Jul 11 '09 at 19:32
  • Ah, I see. I know the joke, it just didn't connect. I might as well accept this answer, as this doesn't seem to have enough attention to cause any change, and your workaround is pretty decent.
    – Sean
    Jul 11 '09 at 20:00
  • testing escapes for *this* and _that_ and `the other` Jan 1 '10 at 10:33

Escapes in comments, that is, \* and \_ and \` were set up a while ago.

Sorry, this was just an oversight on my part when I put the initial version together.

  • 2
    *this* and _that_ and `the other` Jan 1 '10 at 10:36

You must log in to answer this question.

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