Closed stevemk14ebr closed 8 months ago
Hi! This was closed. Team: If this was fixed, please add phase/solved
. Otherwise, please add one of the no/*
labels.
Sorry wrong repo, move: https://github.com/syntax-tree/mdast-util-to-hast/issues/73
Hi team! Could you describe why this has been marked as external?
Thanks, — bb
Initial checklist
Problem
With nested lists, the loose flag in
listItem
causes newlines at the start of line items that breaks proper list rendering. Seevs loose list:
The issue is specifically:
The start of the
block is put on a newline after the li and this newline causes the bullet to be on the wrong line. In the first case it goes:
Where the div is immediately after with no newline and this renders correctly.
The markdown here is:
Compare this to a markdown without a space between the first bullet and the next ones. (Not a loose list). With the markdown being:
So you can see how this is undesireable, the bullet should stay aligned to the correct row but it's not when loose lists are detected. Please allow an option to disable loose lists, I cannot have this newline character present at the start of the listItem.
Solution
Add an optional flag to disable loose lists
Alternatives
Change listItem to not place a newline before the listItem.