Comments (7)
Hey @YannJY02 . The Linter does not remove blank lines to the point of getting rid of them when bottom=false
. There is an exception, but that is when 2 headings are back to back if I recall.
from obsidian-linter.
So if you want to remove blank lines after headings you would need to use custom replace.
Note: I am planning to close this issue if I do not hear back by the 20th.
from obsidian-linter.
I'm seeing the opposite problem. Blank lines are only being added after a heading if the "All headings have a blank lin both before and after..." enabled. I want blank lines after all headings, but not necessarily before every header. For instance, when a header is immediately preceded by a line "---", the blank line is unnecessary.
from obsidian-linter.
Hey @MelGrubb . I could you provide an example of what you are seeing? I am not able to reproduce the issue mentioned above/it is expected behavior since Bottom=false
. It seems like you are talking about a different scenario, so if you could provide information on what is going and what you expect the output to be that would be great! Otherwise, I plan to close this on the 10th.
from obsidian-linter.
Sure. Paste this into a fresh document and then format it.
# Header 1
Some text
---
# Header 2
Some more text
If you have "all headings have a blank line both before and after..." enabled, but "bottom" disabled, you will end up with a blank line above Header #2, but not between header 2 and "some more text". If you enable both "All" and "Bottom", you'll end up with a blank line before AND after header #2, even though the one before is isn't strictly necessary because of the line. And finally, if you disable "all", but enable "bottom, absolutely nothing will happen at all.
It seems to me that enabling "bottom" all by itself ought to do what it says. It ought to put a blank line after every header. It only seems to work when "all" is enabled, though. It does not appear to be an independent setting of its own.
from obsidian-linter.
Sure. Paste this into a fresh document and then format it.
# Header 1 Some text --- # Header 2 Some more text
If you have "all headings have a blank line both before and after..." enabled, but "bottom" disabled, you will end up with a blank line above Header #2, but not between header 2 and "some more text". If you enable both "All" and "Bottom", you'll end up with a blank line before AND after header #2, even though the one before is isn't strictly necessary because of the line. And finally, if you disable "all", but enable "bottom, absolutely nothing will happen at all.
It seems to me that enabling "bottom" all by itself ought to do what it says. It ought to put a blank line after every header. It only seems to work when "all" is enabled, though. It does not appear to be an independent setting of its own.
Sorry about the confusion. I do not believe that the Linter has ever allowed you to not enable blank lines before a heading. Those are always enabled if the rule is enabled. I guess the Linter needs some work because looking at the description for enabling the option it is no longer fully accurate and can lead to the misconception that seems to have arisen here:
The first toggle under a rule is the option to enable a rule (sometimes it is the only option). The toggles after that are just extra options that exist. I do need to reword the enabling option, but there definitely has never been an option to not add a value before a heading except when dealing with an empty line between a the YAML frontmatter and and a header.
If you are trying to have the ability to not add a heading blank line before a heading then, that would be need to be a separate feature request.
Does this help with alleviate the confusion here?
from obsidian-linter.
That would clear up the confusion, yes. I guess I'm looking for something like the "Empty line between YAML and Header" option, but for horizontal rules. My styles are built off of the default set, and it already puts a big vertical space before all headers, so another blank line seems like overkill. I could attack this from another angle by updating the styles to get rid of that space, but since I'm based off the default styles, I figured this is probably happening to most other users that don't heavily customize.
from obsidian-linter.
Related Issues (20)
- Bug: Remove space header when option `RemoveSpaceAroundCharacters` is enabled and Katakata is beginning of the line HOT 1
- FR: Matching / Tidying Header Pound Signs
- Bug: capitalize-headings, yaml-title, yaml-title-alias require two lint passes to resolve
- FR: Ignore yaml-title rule if key exists with a value
- FR: Enable Linter to Run on Files That Are Not Currently Open in Obsidian HOT 3
- Bug: Tags are not moved into the YAML frontmatter if they have emoji in it HOT 2
- Bug: Ellipsis substitution inserts a range mark HOT 2
- Bug: Some strings are only processed on alternate pastes HOT 6
- Bug: Heading blank lines not only adds a blank line before/after headings, it also removes consecutive blank lines HOT 6
- FR: Multiple linter settings/settings HOT 2
- Bug: First letter in Title Case not Uppercase when preceded with numbers or special characters HOT 5
- FR: Restrict regex to note body HOT 14
- Bug: Duplication. `.. Linter | Spacings | Tabsize` already defined in `Obsidian | Settings | Options | Editor | tab size` HOT 2
- FR: Start Header Increment at Heading Level 2 - Add option to ignore very first heading. HOT 3
- FR: formatting/deleting extra lines in code block HOT 2
- Bug: Linter setting breaks 'Share Note' plugin HOT 3
- FR: `YAML Timestamp` section is wonderful, but it needs to ignore your templates. HOT 3
- Bug: HTML comment treated as paragraph HOT 3
- FR: Lint on file change isn't checking whether the file was actually changed HOT 2
- Bug: YAML modified timestamp / order of operations HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from obsidian-linter.