Search code examples
formattingescapingmarkdowngithub-flavored-markdown

Escaping backticks in a markdown table


I have the following text for a table in markdown, I've googled the issue and reviewed the already answered StackOverflow question: How does one escape backticks in markdown?

I can't seem to find a solution to my problem, the text will just not render as a table in markdown.

This brings us to our next topic under strings, Escaping and Special Characters.
| Code | Description | Example |
|:------:|:-----------------:|:----------------------:|
| \n | Newline | "Hello\nWorld" |
| \r | Return Carriage | "Line1\rLine2" |
| \t | Tab | "Hello\tWorld" |
| \' | Single Quotation | 'Don\\'t clap!' |
| \"" | Double Quotation | "Say, \\"Hello.\\"" |
| \$ | Dollar Sign | `` `Hey ${user_name}!` `` |
| \\\ | Backslash | "5\\5 === 1" |
| \uXXXX | Unicode Point | "Alpha Symbol: \u03B1" |
| \xXX | Latin-1 Character | "Mu Symbol: \xDF" |
| \0 | NUL Character | "ASCII NUL: \o" |
| \v | Vertical Tab | "Vertical Tab: \v" |
| \b | Backspace | "Backspace: \b" |
| \f | Form Feed | "Form Feed: \f" |

I realize the content is somewhat ironic, regardless I think it has to do with `Hey ${user_name}!` part.


Solution

  • This has nothing to do with your backticks. Simply add a blank line between your text and the beginning of the table:

    This brings us to our next topic under strings, Escaping and Special Characters.
    
    | Code | Description | Example |
    |:------:|:-----------------:|:----------------------:|
    | \n | Newline | "Hello\nWorld" |
    | \r | Return Carriage | "Line1\rLine2" |
    | \t | Tab | "Hello\tWorld" |
    | \' | Single Quotation | 'Don\\'t clap!' |
    | \"" | Double Quotation | "Say, \\"Hello.\\"" |
    | \$ | Dollar Sign | `` `Hey ${user_name}!` `` |
    | \\\ | Backslash | "5\\5 === 1" |
    | \uXXXX | Unicode Point | "Alpha Symbol: \u03B1" |
    | \xXX | Latin-1 Character | "Mu Symbol: \xDF" |
    | \0 | NUL Character | "ASCII NUL: \o" |
    | \v | Vertical Tab | "Vertical Tab: \v" |
    | \b | Backspace | "Backspace: \b" |
    | \f | Form Feed | "Form Feed: \f" |
    

    If you don't want your `Hey ${user_name}!` to be rendered as inline code, try using \`Hey ${user_name}!\` instead of the outer double backticks.