-
List item 1
-
List item 2
code line 1 code line 2 code line 3
-
List item 3
Last active
December 20, 2015 17:08
-
-
Save chrissearle/6166045 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* List item 1 | |
* List item 2 | |
code line 1 | |
code line 2 | |
code line 3 | |
* List item 3 |
-
List item 1
-
List item 2
code line 1 code line 2 code line 3
-
List item 3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This behavior is intentional. The amount of indentation used for list items is determined by the first non-whitespace character on the list item starting line.
This means that the content of the list item has an indentation of 2, not 4. Therefore the code block needs to be indented 6 spaces, not 8 spaces.
All this is documented in the syntax documentation and this is one part in which kramdown differs from the original Markdown. The reason for this is to get something that works easy and in an unsurprising way. You don't really want to know how the original Markdown handles differently indented list items and especially nested list items...