Giter Club home page Giter Club logo

Comments (7)

pjkaufman avatar pjkaufman commented on September 26, 2024

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.

pjkaufman avatar pjkaufman commented on September 26, 2024

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.

MelGrubb avatar MelGrubb commented on September 26, 2024

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.

pjkaufman avatar pjkaufman commented on September 26, 2024

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.

MelGrubb avatar MelGrubb commented on September 26, 2024

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.

pjkaufman avatar pjkaufman commented on September 26, 2024

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:
image

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.

MelGrubb avatar MelGrubb commented on September 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.