Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List item requires too much spaces for nesting #495

Closed
gfx opened this issue Aug 28, 2017 · 5 comments
Closed

List item requires too much spaces for nesting #495

gfx opened this issue Aug 28, 2017 · 5 comments

Comments

@gfx
Copy link

gfx commented Aug 28, 2017

v0.28 of List Item spec is too complex to understand.

http://spec.commonmark.org/0.28/#list-items

See the rendered result of the code:

100. foo
    * bar

babelmark: https://babelmark.github.io/?text=100.+foo%0A++++*+bar

which is not nested but flatten in commonmark, as the spec says. This is the spec, but whoever wants this behavior? I don't know the editor that can make a nest with a single TAB key. I think it is a specification problem because it is a too complex rule compared with other markdowns.

Why didn't the spec define "nesting lists require 2 spaces" (or "4 spaces")?

@mity
Copy link

mity commented Aug 28, 2017

Also when adding 100-th list item into a list with nested lists, it may require deeper nesting then in the previous 99 items, so author may need to edit all the preceding items to get visually nice document in the raw form.

@jgm
Copy link
Member

jgm commented Aug 28, 2017 via email

@gfx
Copy link
Author

gfx commented Aug 30, 2017

But as a result, only CommonMark does not make nested lists.

I disagree with the spec that CommonMark is not compatible with commonly-used markdown parsers such as pandoc, redcarpet, or even markdown.pl.

@aidantwoods
Copy link
Contributor

It's perhaps worth noting that the parsers which produce the desired indent do not support a perhaps useful feature of starting the list at item 100.

I disagree with the spec that CommonMark is not compatible with commonly-used markdown parsers such as pandoc, redcarpet, or even markdown.pl.

Just because lots of parsers do something, I'm not sure it makes it better? The whole point in CommonMark is to establish a spec that conforming parsers should follow – eliminating this exact type of problem. I'll bet that all of the parsers listed disagree frequently elsewhere, especially if they're attempting to follow the original Markdown implementation.

For example, pandoc and redcarpet don't agree on how to parse the following

100.    foo
    * bar

https://babelmark.github.io/?text=100.++++foo%0A++++*+bar

@mity
Copy link

mity commented Sep 16, 2017

Even if we take CommonMark specification as given and reject seeing it as a nested list, it is very unclear how to interpret it. Because it is long and because I see this issue more as a request to change the spec., I have created #497 to address it within the bounds of current spec wording.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants