mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-26 01:36:03 +03:00
[GH-ISSUE #1026] MD036 triggered right before a header #597
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#597
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 @fharper on GitHub (Oct 30, 2023).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1026
In this example
The italic note will trigger the MD036 rule. I think it should not be triggered if there is a title immediately after, which would mean with no doubt that the emphasis isn't used as a title, since there is no parapgrah of text after it. WDYT?
@DavidAnson commented on GitHub (Oct 31, 2023):
It's valid to have a heading that isn't followed by paragraph text – perhaps there is another heading or a block quote or the end of the file, etc.. I do not think the heuristic proposed is super reliable, and I'm reluctant to try to put too much intelligence into this rule. I think it is correct to warn in this case and clear why it did so. If this is a pattern you use frequently, you may want to disable the rule for that file or project.