markdown

How to put (in markdown) an inline code block that only contains a backtick character (`)


Use case: Describing a programming language that uses backticks for comments. What should I write?

Comments are entered with a whattoputhere character.

So I need an inline code block that only contains a backtick. How to enter this?

I read this question and its answers: How does one escape backticks in markdown?

But it doesn't seem to solve the problem. Apparently, to be able to put a single backtick in an inline code block I need to enclose it with doublebackticks, rather than single backticks, producing something like this:

``I can use a backtick ` here ``

I can use a backtick ` here

But in my use case this degeneraters to this:

`````

Which renders like this: `````

Is there any way to enter an inline code block that only contains a single backtick character in Markdown?


Solution

  • This one is actually given as an example by John Gruber himself.

    You can see from the Markdown documentation that you should write `` ` `` to get `.