The lheading rule starts by setting the parent type to paragraph.
|
const oldParentType = state.parentType |
|
state.parentType = 'paragraph' // use paragraph to match terminatorRules |
However, if it does not match, it fails to reset the parent type.
|
if (!level) { |
|
// Didn't find valid underline |
|
return false |
|
} |
This can break other rules.
The lheading rule starts by setting the parent type to paragraph.
markdown-it/lib/rules_block/lheading.mjs
Lines 9 to 10 in d2782d8
However, if it does not match, it fails to reset the parent type.
markdown-it/lib/rules_block/lheading.mjs
Lines 58 to 61 in d2782d8
This can break other rules.