mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 09:16:02 +03:00
[GH-ISSUE #1267] MD036: doesn't fire when any HTML comment is present on the same line. #2498
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#2498
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 @wwarriner on GitHub (Jun 21, 2024).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/1267
Hey there, appreciate the linter and associated tooling and am using it for pre-commit hooks and CI/CD in our organization's documentation. Thank you!
I've discovered that MD036 doesn't fire when any HTML comment is present on the same line. I do not know if this is intended behavior and could not determine based on a cursory search of past issues (searching for MD036) nor the docs.
The rationale for MD036 says "Using emphasis instead of a heading prevents tools from inferring the structure of a document." If an HTML comment prevents this rule from firing, then the rationale is not achieved, as the comment should have no impact on inference. Unless there is tooling that uses comments to infer document structure? I honestly don't know, but it would surprise me.
To reproduce, create a markdown document with the following.
The output should look like the following, noting that line 5 is not present in the output.
I hope this is helpful.