Let's see what the Markdown documentation has to say:
Inline code spans
To include a literal backtick character within a code span, you can use multiple backticks as the opening and closing delimiters:
``There is a literal backtick (`) here.``
which will produce this:
<p><code>There is a literal backtick (`) here.</code></p>
The backtick delimiters surrounding a code span may include spaces — one after the opening, one before the closing. This allows you to place literal backtick characters at the beginning or end of a code span:
A single backtick in a code span: `` ` ``
A backtick-delimited string in a code span: `` `foo` ``
In other words, the "triple backtick workaround" you mention isn't actually a workaround, it's the correct way to escape backticks in a code span. Note that you could also use double backticks and a space at the beginning and end of the span, as above.
Backslash escapes
Markdown allows you to use backslash escapes to generate literal characters which would otherwise have special meaning in Markdown’s formatting syntax. For example, if you wanted to surround a word with literal asterisks (instead of an HTML <em>
tag), you can use backslashes before the asterisks, like this:
\*literal asterisks\*
Keep in mind that inline code spans already treat their contents as literal characters (except for backticks, see above). This means that `\`
is treated as a code span containing the single character \
, not as the beginning of a code span containing a literal `
.
Why is Markdown parsing different for comments vs. answers?
Comments only support a subset of Markdown syntax. This is addressed in the FAQ on code formatting:
In comments, the additional space in the delimiters is not supported. Instead, escape the backtick: `\`<html>\``
and `$\``
to get `<html>`
or $`
in a comment.
I assume this is a feature unique to Stack Exchange's implementation of Markdown used in comments, since it's not mentioned in the official Markdown documentation.
`table`.`column` AS `other_column`