Skip to content

Instantly share code, notes, and snippets.

@joejulian
Created June 13, 2019 17:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joejulian/8cf2f20b58dbca2135e20dcc2de5d67a to your computer and use it in GitHub Desktop.
Save joejulian/8cf2f20b58dbca2135e20dcc2de5d67a to your computer and use it in GitHub Desktop.
ordered list with code blocks

Ordered List with Code Blocks

This is an example of how to do ordered lists with code blocks and example of how not to do ordered lists with code blocks.

Correct Example

  1. This is an ordered list's first element.

  2. This is the second element and, despite starting with a 1, will be numbered 2.

    echo "This is a code block that is part of the second element."
  3. This is the third element, numbered 3.

Incorrect Example

  1. This is an ordered list's first element.
  2. This is the second element and, despite starting with a 1, will be numbered 2.
echo "This is a code block that is part of the second element."
  1. This should be the third element, numbered 3 but is instead numbered 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment