Open iacore opened 2 weeks ago
The syntax description describes how we group list items into groups. Essentially, we group consecutive items of the same type, where the types are defined by marker style. One possible change would be to track whether the list item is followed by a blank line -- call these items "spaced" -- and say that a list containing nonspaced items can contain at most one spaced item, at the end, and a list containing spaced items can contain at most one nonspaced item, at the end.
In the case at hand you can achieve three different tight lists by putting a comment between them:
- a
- b
{%x}
- c
{%x}
- d
- e
Not very pretty but it works!
my solution:
- a
- b
{}
- c
{}
- d
- e
Oh, totally empty "attributes"! I didn't even consider that that might work!
I tried to write three separate lists. However, it turns out to be one loose list. This behavior is unintuitive to me. Maybe there could be a better heuristic to loose list rendering, or an option to turn it off?
REL: https://github.com/jgm/djot.js/issues/91