obsidian-linter
obsidian-linter copied to clipboard
FR: Allow 'Heading Blank Lines' Blanks Between Headings Action to Be Configurable
The behavior of 'Heading Blank Lines' has changed after upgrading to v1.20.1.
I found that it is fixed by this issue: GitHub Issue 773
However, I have become accustomed to the old behavior. How can I ensure there are always blank lines before headings when bottom is disabled.
Here are my settings in Obsidian Linter:
- Heading blank lines: enabled
- Bottom: disabled
After upgrading to v1.20.1, the linter cannot add a blank line before headings when a heading is just before it.
For example:
In v1.20.0:
Before:
# heading
## heading
## heading
After: Adding blank lines between headings:
# heading
## heading
## heading
In v1.20.1:
Before:
# heading
## heading
## heading
After: Nothing changes:
# heading
## heading
## heading
Hey @qiaoxingxing . A bug got fully removed with the patch you are referring to. Essentially before and after get muddle when no content is present between headers.
Thus what happens is bottom being set to false takes precedence. Thus blank lines between headings gets removed since they are below one heading and after another.
The only way to get around this would be one of the following:
- Turn bottom on
- Add custom regex to add the blank line
- FR for the ability to decide what happens to spaces between headers
Hey @qiaoxingxing . I am planning on closing this soon since I have not heard back on this. Feel free to let us know if the 3 options listed above are not feasible or do not make sense.
@pjkaufman, I truly appreciate your reply. All three options make sense to me, but I have decided to go with the fourth option: downgrading to the old version temporarily while waiting for the implementation of the third option. :)