mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 14:30:12 +01:00
Update MD037/no-space-in-emphasis to ignore content of math blocks when used with markdown-it-texmath (fixes #357).
This commit is contained in:
parent
d6cd840e7d
commit
df4aa9f4e8
5 changed files with 89 additions and 37 deletions
|
|
@ -1508,15 +1508,19 @@ $$\n`
|
|||
});
|
||||
});
|
||||
|
||||
test.cb("texmath-content-in-lists with texmath plugin", (t) => {
|
||||
test.cb("texmath test files with texmath plugin", (t) => {
|
||||
t.plan(2);
|
||||
markdownlint({
|
||||
"files": [ "./test/texmath-content-in-lists.md" ],
|
||||
"files": [
|
||||
"./test/texmath-content-in-lists.md",
|
||||
"./test/texmath-content-violating-md037.md"
|
||||
],
|
||||
"markdownItPlugins": [ [ pluginTexMath, pluginTexMathOptions ] ]
|
||||
}, function callback(err, actual) {
|
||||
t.falsy(err);
|
||||
const expected = {
|
||||
"./test/texmath-content-in-lists.md": []
|
||||
"./test/texmath-content-in-lists.md": [],
|
||||
"./test/texmath-content-violating-md037.md": []
|
||||
};
|
||||
t.deepEqual(actual, expected, "Unexpected issues.");
|
||||
t.end();
|
||||
|
|
|
|||
19
test/texmath-content-violating-md037.md
Normal file
19
test/texmath-content-violating-md037.md
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# texmath-content-violating-md037
|
||||
|
||||
## Inline (not handled)
|
||||
|
||||
text `$ x * y * z $` text
|
||||
|
||||
text `$$ x * y * z $$` text
|
||||
|
||||
## Block (handled when used with markdown-it-texmath)
|
||||
|
||||
$$
|
||||
x * y * z {MD037}
|
||||
$$
|
||||
|
||||
text
|
||||
|
||||
$$
|
||||
x * y = x * y {MD037}
|
||||
$$
|
||||
Loading…
Add table
Add a link
Reference in a new issue