obsidian-linter: Bug: Empty Line Around Tables not respected
Describe the Bug
“Empty Line Around Tables” option is enabled in Linter but when the command is ran it removes all empty lines between a Header and the table
How to Reproduce
Steps to reproduce the behavior:
- Enable “Empty Line Around Tables”
- In a document (not beginning or end) create a H2, create an empty line and add a table after the header
- Run Linter
- Empty line between H2 and table is removed and table is not rendered properly
Example to reproduce issue with
## Logical operators
| Operator | Meaning | Example |
|----------|--------------------------|-----------------------|
|`==`| Is Equal To | 3 == 5 gives us False |
|`!=`| Not Equal To | 3 != 5 gives us True |
|`>`| Greater Than | 3 > 5 gives us False |
|`<` | Less Than | 3 < 5 gives us True |
|`>=`| Greater Than or Equal To | 3 >= 5 give us False |
|`<=`|Less Than or Equal To|3 <= 5 gives us True |
Log
Running linter Running Format Tags in YAML Running Format Yaml Array Running Move Tags to Yaml Running Remove Trailing Punctuation in Heading Running Convert Bullet List Markers Running Remove Consecutive List Markers Running Remove Empty List Markers Running Remove Hyphenated Line Breaks Running Remove Multiple Spaces Running Two Spaces Between Lines with Content Running Compact YAML Running Consecutive blank lines Running Empty Line Around Blockquotes Running Empty Line Around Code Fences Running Empty Line Around Math Blocks Running Empty Line Around Tables Running Heading blank lines Running Remove Empty Lines Between List Markers and Checklists Running Remove link spacing Running Space after list markers Running Trailing spaces Running Custom Regex Running Capitalize Headings Running Custom Lint Commands
Expected Behavior
There should be one empty line between the H2 and the table
Screenshots
Before
After
Device
- [ x] Desktop
- Mobile
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 19 (1 by maintainers)
Commits related to this issue
- fix: add blank line between table and heading should fix #751 — committed to qazxcdswe123/obsidian-linter by qazxcdswe123 a year ago
I have pushed up a potential fix for this. It is now on master. So it should go out with the next release. Please let us know if it is not fixed in that release.
The change made was to make it so that
Heading Blank Linesdoes not remove multiple blank lines after any heading* whenbottom = false.*: There is an exception to this according to the code, but I am not sure how to describe it since I was not around when the rule was written and I currently do not understand its use in the code.