mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2026-04-25 01:05:55 +03:00
[GH-ISSUE #64] Should ignore rules inside a comment block #1902
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#1902
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 @CxRes on GitHub (Jul 5, 2017).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/64
Comments should be free from md rules! Or there should be an option to not check...
@DavidAnson commented on GitHub (Jul 5, 2017):
I think you are asking for text inside HTML comments in a Markdown file to be ignored? Is it a particular set of rules you'd like to exclude, or all of them? What is your scenario?
@CxRes commented on GitHub (Jul 6, 2017):
@DavidAnson Exactly...
So, I am writing a comment block something like this:
And the linter does not like this formatting one bit because it thinks that the lines inside are items and hence incorrectly formatted.
I would have presumed (correct me if I am wrong) that markup rules should be irrelevant inside comment blocks, in general, well because, you might want to put arbitrary information inside them???
@DavidAnson commented on GitHub (Jul 6, 2017):
Markdown did not originally support comments, though it is used often enough with HTML that HTML comments are usually allowed. Some linting rules (ex: hard-tabs, proper-names) seem to apply just as well within a comment as without. So my thought is to leave the default behavior as it is now and add a global Boolean option to ignore HTML comments as you suggest above.
@CxRes commented on GitHub (Jul 7, 2017):
Sounds good!!!
I can see the slippery slope here. Since markdown is a superset of HTML, you'll have to disable rules inside all HTML tags used in the md, which may not be desirable.