Backticks in code span

This post was flagged by the community and is temporarily hidden.

Markdown cannot reasonably allow nesting single backticks in a code span denoted by single backticks. Otherwise, how could any parser distinguish in a paragraph containing many backticks, which ones are supposed to be a code span beginning, which ones are a code span end, or which ones are part of a code span contents?

The rule exists to solve another problem. Without it, you could not encode a code span which contains `which java` and nothing else. I.e.

`` `which java` ``

would correspond to

<code> `which java` </code>

i.e. the leading and trailing space would be part of the code span contents.

And if you would omit the spaces in the markdown input, the backticks would suddenly be part of the Markdown syntax denoting a code span, and not its contents at all.

This post was flagged by the community and is temporarily hidden.