mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20: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
|
|
@ -76,13 +76,13 @@ module.exports = {
|
|||
resetRunTracking();
|
||||
forEachLine(
|
||||
lineMetadata(),
|
||||
(line, lineIndex, inCode, onFence, inTable, inItem, onBreak) => {
|
||||
(line, lineIndex, inCode, onFence, inTable, inItem, onBreak, inMath) => {
|
||||
const onItemStart = (inItem === 1);
|
||||
if (inCode || inTable || onBreak || onItemStart || isBlankLine(line)) {
|
||||
// Emphasis resets when leaving a block
|
||||
resetRunTracking();
|
||||
}
|
||||
if (inCode || onBreak) {
|
||||
if (inCode || onBreak || inMath) {
|
||||
// Emphasis has no meaning here
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue