mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 22:40:13 +01:00
Reimplement MD039/no-space-in-links using micromark tokens.
This commit is contained in:
parent
92a19b6f36
commit
daa155d5a1
6 changed files with 265 additions and 124 deletions
|
|
@ -1104,20 +1104,13 @@ test("someCustomRulesHaveValidUrl", (t) => {
|
|||
});
|
||||
|
||||
test("markdownItPluginsSingle", (t) => new Promise((resolve) => {
|
||||
t.plan(2);
|
||||
t.plan(4);
|
||||
markdownlint({
|
||||
"strings": {
|
||||
"string": "# Heading\n\nText [ link ](https://example.com)\n"
|
||||
"string": "# Heading\n\nText\n"
|
||||
},
|
||||
"markdownItPlugins": [
|
||||
[
|
||||
pluginInline,
|
||||
"trim_text_plugin",
|
||||
"text",
|
||||
function iterator(tokens, index) {
|
||||
tokens[index].content = tokens[index].content.trim();
|
||||
}
|
||||
]
|
||||
[ pluginInline, "check_text_plugin", "text", () => t.true(true) ]
|
||||
]
|
||||
}, function callback(err, actual) {
|
||||
t.falsy(err);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue