Closed bluebirch closed 1 month ago
@bluebirch , I believe this is the intended behavior. Please see the examples under https://platers.github.io/obsidian-linter/settings/spacing-rules/#heading-blank-lines. Please let me know if this needs more explaining. Thanks!
There is no example there showcasing consecutive blank lines. And the description only mentions inserting blank lines. And that "all headings have a blank line both before and after", which perhaps chould be clarified as "all headings have exactly one blank line both before and after" (or, as I expected, "all headings have at least one blank line both before and after". "A blank line" can mean both.
The example here does show consecutive blank lines getting cut down to exactly one: Or am I seeing thing?
And that "all headings have a blank line both before and after", which perhaps chould be clarified as "all headings have exactly one blank line both before and after" (or, as I expected, "all headings have at least one blank line both before and after". "A blank line" can mean both.
Clarification could be added to say exactly 1 blank line, though I am not sure that saying "A blank line" should be considered to allow both one and many blank lines in the source file. But adding extra clarification to the wording here to make this clearer would be a win.
I can see about updating the wording to say that it will only have 1 blank line.
The example here does show consecutive blank lines getting cut down to exactly one:
You're right. Sorry. Missed that. Yes, please clarify, if nothing else to avoid bug reports from people like me. 😉
Sounds good. I will do that and then close this issue out when I make that doc change.
The wording update should be ready to go live in the next release and on master.
Describe the Bug
Heading blank lines not only adds a blank line before/after headings, it also removes consecutive blank lines, effectively ensuring there is one and only one blank line before and after headings.
How to Reproduce
Before:
After linting:
Expected Behavior
Expected output is same as input.
Screenshots
If applicable, add screenshots to help explain your problem.
Device