mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Update MD053/link-image-reference-definitions to handle references within references (i.e., Pandoc-style footnotes), verify Pandoc footnote indent is not treated as comment when markdown-it-footnote plugin is used (fixes #599).
This commit is contained in:
parent
7d1fa55cc4
commit
592a42b0cb
8 changed files with 169 additions and 2 deletions
|
@ -6,6 +6,7 @@ const fs = require("node:fs");
|
|||
const path = require("node:path");
|
||||
const jsYaml = require("js-yaml");
|
||||
const md = require("markdown-it")();
|
||||
const pluginFootnote = require("markdown-it-footnote");
|
||||
const pluginInline = require("markdown-it-for-inline");
|
||||
const pluginSub = require("markdown-it-sub");
|
||||
const pluginSup = require("markdown-it-sup");
|
||||
|
@ -1254,6 +1255,32 @@ test("texmath test files with texmath plugin", (t) => new Promise((resolve) => {
|
|||
});
|
||||
}));
|
||||
|
||||
test("Pandoc footnote via footnote plugin", (t) => new Promise((resolve) => {
|
||||
t.plan(2);
|
||||
markdownlint({
|
||||
"strings": {
|
||||
"string":
|
||||
`# Heading
|
||||
|
||||
Text with: [^footnote]
|
||||
|
||||
[^footnote]: Footnote text on multiple
|
||||
|
||||
lines including a [reference][]
|
||||
|
||||
[reference]: https://example.com
|
||||
`
|
||||
},
|
||||
"markdownItPlugins": [ [ pluginFootnote ] ],
|
||||
"resultVersion": 0
|
||||
}, (err, actual) => {
|
||||
t.falsy(err);
|
||||
const expected = { "string": {} };
|
||||
t.deepEqual(actual, expected, "Unexpected issues.");
|
||||
resolve();
|
||||
});
|
||||
}));
|
||||
|
||||
test("token-map-spans", (t) => {
|
||||
t.plan(38);
|
||||
const options = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue