[Question] lexer - a `space` betwen two lists
Marked version: 12.0.2
Describe the bug Given the following plain text:
- list 1
- list item I
- list item II
- list item III
- list item I.I
- list 2
- list item I
- list item II
- list item III
- list item I.I
Notice that the new lines between two lists have no spaces, they are just plain new lines.
The following data is the lexing result:
- There are a total of 2 tokens: the (1) is the token of the 1st list, the (2) is the token of the 2nd list.
Question: Why the space token is considered as an item of the 1st list, instead of considered as 3 tokens: [list1, space, list2]?
Why the space token is considered as an item of the 1st list, instead of considered as 3 tokens: [list1, space, list2]?
Why not? Mostly because everyone's use case is different and there is no spec for tokens.
Also list items can be multiple lines so technically the blank lines are part of the last list item of the first list.
And that is not 2 different lists. That is one list with 2 items.
And that is not 2 different lists. That is one list with 2 items.
In that case, what is the current way to place two different lists one after the other?
Intuitively, it seems that if you want to put several lines in one list item, you should place the content of this item with the indent. Like this
1. To do the job
It's a complicated job
2. rest
But when the user makes several line breaks after the list, obviously he wants to make it clear that the list is over
See https://spec.commonmark.org/0.31.2/#lists
In that case, what is the current way to place two different lists one after the other?
Use a different list marker
- list 1
- list item I
- list item II
- list item III
- list item I.I
+ list 2
- list item I
- list item II
- list item III
- list item I.I
But when the user makes several line breaks after the list, obviously he wants to make it clear that the list is over
If you want to change the spec you will have to create an issue here.