Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make list tightness match the reference implementation closer
This solves the problem where blank lines in the middle of a list are attributed to the list itself instead of the item, making its parent list become spurriously loose. Given this reduced example, which helps understand the problem but not reproduce it: ```markdown * - - test ``` Consider this subset of the test case: 1 | * - | ^ first blank line of ListItem 2 | | ^ second blank line of ListItem 3 | | ^ the is what the commit changes: | it used to be considered a blank in the List, | but is now also considered part of the ListItem 4 | - | ^ second ListItem takes its first blank, just like before 5 | | ^ as part of finalization, this second blank goes three two ownership changes: | first, the `-` List takes it from its ListItem, because it's the last ListItem, | and, second, the `*` List takes it from its child, because it's at the end | 6 | test | ^ lists end here The change in this commit changes the List to take ownership of a blank line only if its a trailing blank line at the end of a list item (like line 5) and never from the middle (like lines 3 and 2).
- Loading branch information