til

Today I Learned: collection of notes, tips and tricks and stuff I learn from day to day working with computers and technology as an open source contributor and product manager

View project on GitHub

How do I escape backtick

If you need to escape ` (backtick) in Markdown, in a code example

`code example`

You simply add additional backticks to your markup.

``this is a backtick: ` ``

How do I escape a complete fenced codeblock

You can do this by indenting with spaces and fence it with a code fence with Markdown as language.


    ```markdown

        ```perl

        CODE

        ```

    ```

The above should render:


    ```perl

    CODE

    ```

I am not sure the Markdown indicator is needed. This works for GitHub flavoured Markdown it seems.

You can also escape code fences with 3 sequential tildes

~~~

Or four backticks:

` ```` `


    ````
    ```perl

    CODE

    ```
    ````

The above should render:

```perl

CODE

```

Resources and References

  1. StackExchange: “How do I escape a backtick ` in Markdown?”
  2. Markdown Monster Documentation: “Escape Markdown Fenced Code Blocks”