@@ -47,10 +47,13 @@ See [`markdownlint` rules](https://github.com/DavidAnson/markdownlint#rules--ali
47
47
4. Edit ` .markdownlint-cli2.mjs` file to suit your needs. Start with
48
48
49
49
` ` ` js
50
+ import markdownIt from " markdown-it"
50
51
import configOptions, {init} from " @github/markdownlint-github"
52
+ const markdownItFactory = () => markdownIt({ html: true })
51
53
const options = {
52
54
config: init (),
53
55
customRules: [" @github/markdownlint-github" ],
56
+ markdownItFactory,
54
57
outputFormatters: [
55
58
[ " markdownlint-cli2-formatter-pretty" , { " appendLink" : true } ] // ensures the error message includes a link to the rule documentation
56
59
]
@@ -62,13 +65,16 @@ See [`markdownlint` rules](https://github.com/DavidAnson/markdownlint#rules--ali
62
65
This looks like:
63
66
64
67
` ` ` js
68
+ import markdownIt from " markdown-it"
65
69
import configOptions, {init} from " @github/markdownlint-github"
66
70
const overriddenOptions = init({
67
71
' fenced-code-language' : false, // Custom overrides
68
72
})
73
+ const markdownItFactory = () => markdownIt({ html: true })
69
74
const options = {
70
75
config: overriddenOptions,
71
76
customRules: [" @github/markdownlint-github" ],
77
+ markdownItFactory,
72
78
outputFormatters: [
73
79
[ " markdownlint-cli2-formatter-pretty" , { " appendLink" : true } ]
74
80
]
@@ -96,9 +102,12 @@ The rule will need to be enabled in the configuration. For instance, if you intr
96
102
97
103
```js
98
104
import configOptions, {init} from "@github/markdownlint-github"
105
+ import markdownIt from "markdown-it"
106
+ const markdownItFactory = () => markdownIt({ html: true })
99
107
const options = init({
100
108
"some-rule": true,
101
109
customRules: ["@github/markdownlint-github", "some-rule.js"],
110
+ markdownItFactory
102
111
})
103
112
export default options
104
113
```
0 commit comments