mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 22:10:13 +01:00
Update MD018/no-missing-space-atx and MD020/no-missing-space-closed-atx to ignore the content of HTML blocks (fixes #1268).
This commit is contained in:
parent
a80387a0a0
commit
6c8d0fdef8
7 changed files with 76 additions and 8 deletions
|
|
@ -13,8 +13,9 @@ module.exports = {
|
|||
"tags": [ "headings", "atx", "spaces" ],
|
||||
"parser": "none",
|
||||
"function": function MD018(params, onError) {
|
||||
forEachLine(lineMetadata(), (line, lineIndex, inCode) => {
|
||||
forEachLine(lineMetadata(), (line, lineIndex, inCode, inFence, inTable, inItem, inBreak, inHtml) => {
|
||||
if (!inCode &&
|
||||
!inHtml &&
|
||||
/^#+[^# \t]/.test(line) &&
|
||||
!/#\s*$/.test(line) &&
|
||||
!line.startsWith("#️⃣")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue