GitHub-flavored Markdown does not use C-style escapes for escaping backticks inside spans. Instead, GFM uses double, significant whitespaced, backticks.
Two backticks, then a space, then a backtick, then a space, then two more backticks:
`` ` ``
produces:
`
The reason this works is because Github (or, really, the original Markdown) is using the "use a different delimiter token" style of escaping inline code backticks. So if you need one backtick in the inline code, you start and end the inline code span with tokens made up of multiple backticks. It doesn't have to be double, it may as well be quaduple or 10 backticks. Start with 3, end with 3, then within the span you can include 1- or 2-backtick tokens verbatim.
Example:
Result:
inline code using double backticks - a single ` is included verbatiminline code using triple backticks - so `, ``, ```` etc. can all be included verbatimThat was ten, so ` `` ``` ```` etc. can all be included verbatim at the cost of the delimiter being a bit ridiculousends with a backtick but surrounded by spaces, the spaces are removed`ends with a backtick but not surrounded by spaces, the final space is not removed`I've seen output from an AI agent write
`Ctrl+`` ` ``as if the`` ` ``magically gets substituted with`but that's not how it works.As the final 2 examples show, if you need a span that ends with a backtick inside, first you need there to be a space between it and the ending backticks, and second that space can be removed from the output if there is also a space after the starting backticks.