-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: File Name Heading inserted numerous times #911
Comments
Hey @redactedscribe . This is not really a bug. A H2 is not a file heading. H1 is a file heading. There is an issue somewhere that requests that a warning be shown for this scenario here. |
Here is the issue mentioning the recursion issue: #856. There are several rules that are not compatible together. However the rules themselves do not know what other rules are enabled in general. Thus the Linter would need a way to know that you have incompatible options selected. |
The result isn't desired so I'd argue that it's a bug to the user, although maybe correct in a technical sense. |
Given what has been stated, what is the proposed remedy here? |
It only appears to occur when both of Header Increment's options are enabled. It could get complex to manage checking of different combinations of rules, so perhaps something simpler: A warning symbol present on options which are known to have incompatible rules. Any rules listed could potentially be clicked and the plugin scroll to the position of said rule. This way the user will at least have a heads-up on what not to do, or how to solve some strange behaviour. If on the other hand you want to implement something more comprehensive, then disabling of rules when conflicts are found, with some confirmation beforehand similar to conflicting hotkeys, isn't a bad choice. |
It could be argued however that someone may want the title to be duplicated as the first H2 heading. When a user configures Linter with the options as shown in the screenshot, instead of showing a warning, the title could just be inserted at the top as |
This is definitely a pain point I do not have time to work on right now. However I am open to PRs to fix this while I am working on other features/bugs. |
Describe the Bug
With the below three options enabled, the file name is inserted as a header recursively:
How to Reproduce
Steps to reproduce the behavior:
Expected Behavior
A single file name heading to be inserted / not allow the user to end up with this set of simultaneous options. I only use the latter two options, but I just happened to notice the bug when testing.
Screenshots
Device
Thanks!
The text was updated successfully, but these errors were encountered: