Skip to content

Instantly share code, notes, and snippets.

@lsloan
Forked from clintel/gist:1155906
Last active December 15, 2015 15:56
Show Gist options
  • Save lsloan/edc98bc0a5cc826135a8 to your computer and use it in GitHub Desktop.
Save lsloan/edc98bc0a5cc826135a8 to your computer and use it in GitHub Desktop.
GitHub Markdown lists with embedded code blocks

Fenced code blocks inside ordered and unordered lists

  1. This is a numbered list.

  2. I'm going to include a fenced code block as part of this bullet:

    Code
    More Code
    
  3. We can put fenced code blocks inside nested bullets, too.

    1. Like this:

      printf("Hello, World!");
    2. The key is to indent your fenced block by (4 * bullet_indent_level) spaces.

    3. Also need to put a separating newline above and below the fenced block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment