Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Surprising behaviour when nesting ordered lists with two spaces #353
When I try create a nested ordered list with two space indent:
it does not produce a nested list. Instead, both A and B are rendered at the same level.
It seems that the minimum indentation level is three spaces. While this makes sense in retrospect (after all, the first item starts after three characters), it took me a while to figure it out, as the documentation on this point is rather hard to understand. It doesn't help that Github itself seems to have no problems with two space indents, or even one space:
Perhaps the documentation could be clarified with a few examples? E.g. something like http://spec.commonmark.org/0.25/#example-270.
If you look at the syntax documentation for lists http://kramdown.gettalong.org/syntax.html#lists there are already examples and a very in-depth description of how list indentation works with kramdown - do you mean that there should be more examples?
And yes, kramdown works differently regarding the indentation but this is on purpose, so it is no surprise that Github's parser accepts your input.
Yes, I do think that more examples would clarify things. I especially think that it would help to:
NB. The reason I was surprised that Github works differently, is that I was under the impression that Github itself also uses Kramdown (e.g., https://help.github.com/articles/updating-your-markdown-processor-to-kramdown/).