Bug: Line breaks between lists and horizontal rules are removed when "Remove empty lines between list markers and checklists" is enabled
See original GitHub issueDescribe the Bug
Line breaks between lists and horizontal rules are removed when “Remove empty lines between list markers and checklists” is enabled, if the same character is used for the list item and for the horizontal rule.
How to Reproduce
Given I have "Remove empty lines between list markers and checklists"
enabled, and I have Markdown like:
Some text
---
- Some list item 1
- Some list item 2
---
Some more text
When I trigger the linter by saving the file
Then the content is linted like this (notice the line breaks removed between the list and the horizontal rules):
Some text
---
- Some list item 1
- Some list item 2
---
Some more text
Expected Behavior
Given the above example, I would have expected the linter to make no changes.
Screenshots
N/A
Device
- Desktop
- Mobile
Additional Context
This can be avoided by ensuring that the punctuation used for adjacent lists and rules is different (e.g. ***
and -
, or ---
and *
). But it forces you to change the way you write your Markdown, so it’s not an ideal workaround.
Issue Analytics
- State:
- Created a year ago
- Comments:7
Top GitHub Comments
Gotcha. This should be fixed now on master. If the issue is still present there or in the next release, please feel free to let us know and reopen this issue.
I will go ahead and ignore hr’s/thematic breaks for this to fix the issue.