[PR #1299] [MERGED] MD018: do not check # in HTML blocks #1362

Closed
opened 2026-03-03 02:03:08 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/DavidAnson/markdownlint/pull/1299
Author: @fyc09
Created: 7/17/2024
Status: Merged
Merged: 7/20/2024
Merged by: @DavidAnson

Base: nextHead: patch-1


📝 Commits (5)

📊 Changes

7 files changed (+76 additions, -8 deletions)

View changed files

📝 demo/markdownlint-browser.js (+12 -4)
📝 helpers/helpers.js (+7 -1)
📝 lib/md018.js (+2 -1)
📝 lib/md020.js (+3 -2)
test/ignore-html-block.md (+13 -0)
📝 test/snapshots/markdownlint-test-scenarios.js.md (+39 -0)
📝 test/snapshots/markdownlint-test-scenarios.js.snap (+0 -0)

📄 Description

Fix #1268.

Side Effect: MD013 will treat html code (including embedded markdownlint-configure-file) as code blocks, which will emit errors in these cases:

github.com/DavidAnson/markdownlint@b2305efafb/test/long-lines-short-code.md (L27-L32)
github.com/DavidAnson/markdownlint@b2305efafb/test/long-lines-short-code.md (L27-L32)
github.com/DavidAnson/markdownlint@b2305efafb/test/long-lines-strict.md (L33-L39)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/DavidAnson/markdownlint/pull/1299 **Author:** [@fyc09](https://github.com/fyc09) **Created:** 7/17/2024 **Status:** ✅ Merged **Merged:** 7/20/2024 **Merged by:** [@DavidAnson](https://github.com/DavidAnson) **Base:** `next` ← **Head:** `patch-1` --- ### 📝 Commits (5) - [`d2c3b7b`](https://github.com/DavidAnson/markdownlint/commit/d2c3b7b0a92dc2f13298ca0b59aa70ca3c095e73) fix: treat html_block as code. - [`865b5ae`](https://github.com/DavidAnson/markdownlint/commit/865b5ae549393a1860acca17f6f6833cc72a5632) Ignore HTML blocks in MD018 - [`c5b9c27`](https://github.com/DavidAnson/markdownlint/commit/c5b9c274156a16ca35365ac2488a8e4248bf8054) Ignore HTML blocks in MD020. - [`8a30e08`](https://github.com/DavidAnson/markdownlint/commit/8a30e083062544e4145a21230b49b8ce32303655) Lint code and add tests. - [`6b8e423`](https://github.com/DavidAnson/markdownlint/commit/6b8e423e7ff50f13801fc85a46789f04b297d38a) update snapshots ### 📊 Changes **7 files changed** (+76 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `demo/markdownlint-browser.js` (+12 -4) 📝 `helpers/helpers.js` (+7 -1) 📝 `lib/md018.js` (+2 -1) 📝 `lib/md020.js` (+3 -2) ➕ `test/ignore-html-block.md` (+13 -0) 📝 `test/snapshots/markdownlint-test-scenarios.js.md` (+39 -0) 📝 `test/snapshots/markdownlint-test-scenarios.js.snap` (+0 -0) </details> ### 📄 Description Fix #1268. Side Effect: MD013 will treat html code (including embedded markdownlint-configure-file) as code blocks, which will emit errors in these cases: https://github.com/DavidAnson/markdownlint/blob/b2305efafb034b1f328845aec9928b5363ffd646/test/long-lines-short-code.md?plain=1#L27-L32 https://github.com/DavidAnson/markdownlint/blob/b2305efafb034b1f328845aec9928b5363ffd646/test/long-lines-short-code.md?plain=1#L27-L32 https://github.com/DavidAnson/markdownlint/blob/b2305efafb034b1f328845aec9928b5363ffd646/test/long-lines-strict.md?plain=1#L33-L39 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 02:03:08 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/markdownlint#1362
No description provided.