Comment history

Versions of a comment on Additional markdown syntax, newest first.

Current version | Edited by vicky
Changes
Removed: As for nested code blocks, right now "\" as an escape character is behaving *really* weird (or at least I can't make sense of it).Added: As for nested code blocks, right now "\" as an escape character is behaving *really* weird (or at least I can't make sense of it)¹.Added: -# ¹ Actually not that weird now that I've studied it more, it just doesn't escape itself — which is not that strange. I can't escape myself either.* In single-line codeblocks (`\``) it escapes normally, while,
Show
As for nested code blocks, right now "\" as an escape character is behaving really weird (or at least I can't make sense of it)¹. ¹ Actually not that weird now that I've studied it more, it just doesn't escape itself — which is not that strange. I can't escape myself either.
  • In single-line codeblocks (`) it escapes normally, while,
  • In multi-line codeblocks (```), it doesn't:
    \`
    
However, trying to escape an escape character ("\") (still in single-line codeblocks) does not work:
  • \\ (two "\" inside backticks renders two "\" instead of the expected one).
However writing a single backslash inside backticks: ` successfully escapes the second backtick, resulting in — as you can see — less-than-ideal results.

My suggestions

  • make the whitespace backtick backslash backtick whitespace a special exception where in this one case the backslash doesn't escape.
  • make backslashes escape normally inside multi-line codeblocks, allowing for:
    \`\`\`LaTeX
    \LaTeX\space the LaTeX logo
    \`\`\`
to render as three backticks without the backspaces; so that copy-pasting the codeblock would work as a latex codeblock.
Original by vicky
Show
As for nested code blocks, right now "\" as an escape character is behaving really weird (or at least I can't make sense of it).
  • In single-line codeblocks (`) it escapes normally, while,
  • In multi-line codeblocks (```), it doesn't:
    \`
    
However, trying to escape an escape character ("\") (still in single-line codeblocks) does not work:
  • \\ (two "\" inside backticks renders two "\" instead of the expected one).
However writing a single backslash inside backticks: ` successfully escapes the second backtick, resulting in — as you can see — less-than-ideal results.

My suggestions

  • make the whitespace backtick backslash backtick whitespace a special exception where in this one case the backslash doesn't escape.
  • make backslashes escape normally inside multi-line codeblocks, allowing for:
    \`\`\`LaTeX
    \LaTeX\space the LaTeX logo
    \`\`\`
to render as three backticks without the backspaces; so that copy-pasting the codeblock would work as a latex codeblock.