mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Update to only invoke rules that are used at least once by the content.
This commit is contained in:
parent
6870a48829
commit
85e704f32a
3 changed files with 48 additions and 10 deletions
|
|
@ -1161,6 +1161,28 @@ test("markdownItPluginsNoMarkdownIt", (t) => new Promise((resolve) => {
|
|||
});
|
||||
}));
|
||||
|
||||
test("markdownItPluginsUnusedUncalled", (t) => new Promise((resolve) => {
|
||||
t.plan(2);
|
||||
markdownlint({
|
||||
"config": {
|
||||
"default": false
|
||||
},
|
||||
"strings": {
|
||||
"string": "# Heading\n\nText\n"
|
||||
},
|
||||
// Use a markdown-it custom rule so the markdown-it plugin will be run
|
||||
"customRules": customRules.anyBlockquote,
|
||||
"markdownItPlugins": [
|
||||
[ pluginInline, "check_text_plugin", "text", () => t.fail() ]
|
||||
]
|
||||
}, function callback(err, actual) {
|
||||
t.falsy(err);
|
||||
const expected = { "string": [] };
|
||||
t.deepEqual(actual, expected, "Unexpected issues.");
|
||||
resolve();
|
||||
});
|
||||
}));
|
||||
|
||||
test("Pandoc footnote", (t) => new Promise((resolve) => {
|
||||
t.plan(2);
|
||||
markdownlint({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue