@@ -47,10 +47,13 @@ See [`markdownlint` rules](https://github.com/DavidAnson/markdownlint#rules--ali
47474. Edit ` .markdownlint-cli2.mjs` file to suit your needs. Start with
4848
4949 ` ` ` js
50+ import markdownIt from " markdown-it"
5051 import configOptions, {init} from " @github/markdownlint-github"
52+ const markdownItFactory = () => markdownIt({ html: true })
5153 const options = {
5254 config: init (),
5355 customRules: [" @github/markdownlint-github" ],
56+ markdownItFactory,
5457 outputFormatters: [
5558 [ " markdownlint-cli2-formatter-pretty" , { " appendLink" : true } ] // ensures the error message includes a link to the rule documentation
5659 ]
@@ -62,13 +65,16 @@ See [`markdownlint` rules](https://github.com/DavidAnson/markdownlint#rules--ali
6265 This looks like:
6366
6467 ` ` ` js
68+ import markdownIt from " markdown-it"
6569 import configOptions, {init} from " @github/markdownlint-github"
6670 const overriddenOptions = init({
6771 ' fenced-code-language' : false, // Custom overrides
6872 })
73+ const markdownItFactory = () => markdownIt({ html: true })
6974 const options = {
7075 config: overriddenOptions,
7176 customRules: [" @github/markdownlint-github" ],
77+ markdownItFactory,
7278 outputFormatters: [
7379 [ " markdownlint-cli2-formatter-pretty" , { " appendLink" : true } ]
7480 ]
@@ -96,9 +102,12 @@ The rule will need to be enabled in the configuration. For instance, if you intr
96102
97103```js
98104import configOptions, {init} from "@github/markdownlint-github"
105+ import markdownIt from "markdown-it"
106+ const markdownItFactory = () => markdownIt({ html: true })
99107const options = init({
100108 "some-rule": true,
101109 customRules: ["@github/markdownlint-github", "some-rule.js"],
110+ markdownItFactory
102111})
103112export default options
104113```
0 commit comments