mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 22:10:13 +01:00
Update clearHtmlCommentText helper to match CommonMark (instead of HTML) specification (refs #361).
This commit is contained in:
parent
6f39df1417
commit
c4e236b858
6 changed files with 148 additions and 48 deletions
65
test/html-comments.md
Normal file
65
test/html-comments.md
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
# HTML Comments
|
||||
|
||||
## Block Comments
|
||||
|
||||
<https://spec.commonmark.org/0.29/#html-blocks>
|
||||
|
||||
<!-- *comment * -->
|
||||
|
||||
<!-- *comment * -->text
|
||||
|
||||
<!-- *comment * -->
|
||||
|
||||
<!-- *code * -->
|
||||
|
||||
<!-- *comment *
|
||||
*comment * -->
|
||||
|
||||
<!-- *comment *
|
||||
*comment *
|
||||
*comment * -->
|
||||
|
||||
<!--> *{MD037} * -->
|
||||
|
||||
<!---> *{MD037} * -->
|
||||
|
||||
<!-- *comment * --->
|
||||
|
||||
<!-- -- *comment * -->
|
||||
|
||||
<!-- *comment * -- -->
|
||||
|
||||
## Inline Comments
|
||||
|
||||
<https://spec.commonmark.org/0.29/#html-comment>
|
||||
|
||||
t<!-- *comment * -->
|
||||
|
||||
t<!-- *comment * -->text
|
||||
|
||||
t<!-- *comment * -->
|
||||
|
||||
t<!-- *code * -->
|
||||
|
||||
t<!-- *comment *
|
||||
*comment * -->
|
||||
|
||||
t<!-- *comment *
|
||||
*comment *
|
||||
*comment * -->
|
||||
|
||||
t<!--> *{MD037} * -->
|
||||
|
||||
t<!---> *{MD037} * -->
|
||||
|
||||
t<!-- *{MD037} * --->
|
||||
|
||||
t<!-- -- *{MD037} * -->
|
||||
|
||||
t<!-- *{MD037} * -- -->
|
||||
|
||||
## Notes
|
||||
|
||||
It's important that the rule used above is one that calls
|
||||
`helpers.forEachLine` so `markdown-it` doesn't ignore any
|
||||
incorrectly-remaining comment blocks.
|
||||
Loading…
Add table
Add a link
Reference in a new issue