mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-26 01:36:03 +03:00
[GH-ISSUE #328] [MD041] - setting front_matter_title to empty string is not turning off the rule in some cases #2129
Labels
No labels
bug
enhancement
enhancement
enhancement
fixed in next
fixed in next
fixed in next
new rule
new rule
new rule
pull-request
question
refactoring
refactoring
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/markdownlint#2129
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @msm1089 on GitHub (Sep 13, 2020).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/328
I am new to using markdownlint (and Jekyll, which is what I am using MD in), so apologies if I have made some simple mistake.
In VS Code, I have installed the recommended extension for markdownlint. I am following the step-by-step guide from the Jekyll site.
I have markdown files like
The first line is violating MD041. I tried turning off the rule in the config:
This seems to half work; when the file is in focus in the editor window, it shows the MD041 warning. When changing focus to a different file, the warning goes away (most of the time, for certain files it remains once they have been in focus in editor window, until I change the config in any way).
It might be some sort of bug with the extension that is causing warning to toggle depending on whether a file is in focus, but I am not asking that to be addressed here ;)
Could anyone help me out with the correct settings to use when creating markdown for Jekyll sites, where there will often be frontmatter that handles missing titles and headings?
@DavidAnson commented on GitHub (Sep 13, 2020):
If you want to turn off the rule, you can use:
"first-line-heading": false. Please try that instead of passing a RegExp that matches everything.@DavidAnson commented on GitHub (Sep 13, 2020):
Regarding the foreground/background behavior you describe, files are scanned when they are in the foreground and any errors will persist even if the file is moved to the background. However, changing settings resets everything and clears all errors, so immediately after doing that only errors that relate to files in the foreground will be displayed.
@msm1089 commented on GitHub (Sep 14, 2020):
Thanks for the quick reply and explaining the behaviour @DavidAnson
Problem resolved!