11

How can I escape a backtick?

I've tried whatever is written in the "How to Format" rubric that's on the right of the page, but it didn't work:
like _so_

I want the backtick to be written in a comment (This is why a code block isn't a solution)

Thank you.

Edit #1 (12:04 UTC):

By using CodeCaster's answer, I've managed to escape a backtick. But a funny thing happens when using the following two examples:

First example:

Code:

`like _so_\``

Result: `like so``

Second Example:

Code:

``like _so_\`

Result: ``like so`

5
  • \`like _so_\` = `like _so_` ??
    – Himanshu
    Commented Aug 1, 2013 at 11:02
  • 1
    Correct answer: The documented solution (somewhere) is to double the starting ` and ending ` . And if you wanted ``` `` , you triplicate them, etc. So to mention ```` Three , two `` and one ` I need four ` at each end ````. (I've flagged to allow my answer to be added.) (Obviously this isn't correct in comments, except for just duplicates!)
    – Mark Hurd
    Commented Aug 1, 2013 at 11:52
  • @Mark Hurd: That works great thanks!
    – Dor
    Commented Aug 1, 2013 at 13:01
  • 1
    Here's an answer that is a duplicate for the original question: How can the backtick character ` be included in code?
    – Mark Hurd
    Commented Aug 1, 2013 at 13:09
  • Hmmm you can see above double backquotes worked and then triple, etc. did not in that comment, but when I tried to mention that as a comment to the answer I've linked to above it didn't work :-( Trying again here: Double ` work sometimes in comments and seeing as it worked again here I successfully added a comment there too.
    – Mark Hurd
    Commented Aug 1, 2013 at 13:15

3 Answers 3

7

As documented here you double the starting ` and ending `.

And if you wanted ``, you triplicate them, etc. So to mention Three ```, two `` and one ` I need four ` at each end.

But only double backticks work in comments, and they're slightly flakey there.

7

Put a backslash in front of it:

`this is not inline`.

1
  • 4
    ` test comment
    – juergen d
    Commented Aug 1, 2013 at 10:57
1

If all your inline code is a single backtick, this only works for comments:

`\``

On posts, you need to double the opening and closing backticks, and surround the middle one with spaces. So:

`` ` ``

Output of the above: `

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