showdown
showdown copied to clipboard
List under a list does not indent
When a list under a list is created in the markdown, it does not indent.
This is how list in GitHub behaves
List with Sub-lists
-
1
- 1.1
- 1.2
-
2
- 2.1
- 2.2
And this is how showdown renders

According to markdown spec, in lists, sub-blocks need to be indented 4 spaces. That includes sub-lists:
- foo
- bar
However, almost all implementations (for historical reasons) accept 2 space indentations in sublists.
You can enabled this feature in showdown with option disableForced4SpacesIndentedSublists
I just noticed that with the last update the Demo Page is broken (options won't stick). I will fix that as fast as possible
@tivie this is still broken for me too. I'm setting disableForced4SpacesIndentedSublists
to true
but still the following:
- foo
- bar
- baz
- qux
gets rendered as:

I'm in the same boat here too. It looks like this Markdown:
- Parent
- First child
- Grandchild
- Second child
Is rendering as this: