Skip to content

Commit 5033e1e

Browse files
committed
Pass newly-required markdownItFactory option to markdownlint.
1 parent b7e47f8 commit 5033e1e

File tree

3 files changed

+78
-12
lines changed

3 files changed

+78
-12
lines changed

markdownlint.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ const options = program.opts();
1919
const version = '0.44.0';
2020
const description = 'MarkdownLint Command Line Interface';
2121

22+
function markdownItFactory() {
23+
return require('markdown-it')({html: true});
24+
}
25+
2226
function posixPath(p) {
2327
return p.split(path.sep).join(path.posix.sep);
2428
}
@@ -291,6 +295,7 @@ function lintAndPrint(stdin, files) {
291295
}
292296

293297
const lintOptions = {
298+
markdownItFactory,
294299
config,
295300
configParsers,
296301
customRules,

package-lock.json

Lines changed: 72 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"jsonc-parser": "~3.3.1",
4646
"jsonpointer": "~5.0.1",
4747
"markdownlint": "~0.38.0",
48+
"markdown-it": "~14.1.0",
4849
"minimatch": "~9.0.5",
4950
"run-con": "~1.3.2",
5051
"smol-toml": "~1.3.4"

0 commit comments

Comments
 (0)