[GH-ISSUE #608] Support allowlist option for MD040 #480

Closed
opened 2026-03-03 01:27:17 +03:00 by kerem · 0 comments
Owner

Originally created by @chenxsan on GitHub (Oct 16, 2022).
Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/608

While MD040 requires us to specify a language, it doesn't specify which languages we can use, which means we can use whatever we want as long as it's not an empty one.

But in the cases of syntax highlighting, tools like refractor will throw an error when we feed it an unknown language. It would be great if we can configure MD040 with an allowlist.

E.g.,

"MD040": { "allowlist": ["js", "css", "html"] },
Originally created by @chenxsan on GitHub (Oct 16, 2022). Original GitHub issue: https://github.com/DavidAnson/markdownlint/issues/608 While MD040 requires us to specify a language, it doesn't specify which languages we can use, which means we can use whatever we want as long as it's not an empty one. But in the cases of syntax highlighting, tools like [refractor](https://github.com/wooorm/refractor#data) will throw an error when we feed it an unknown language. It would be great if we can configure MD040 with an `allowlist`. E.g., ``` "MD040": { "allowlist": ["js", "css", "html"] }, ```
kerem 2026-03-03 01:27:17 +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#480
No description provided.