Update MD037/no-space-in-emphasis to ignore emphasis markers in link text (fixes #280).

This commit is contained in:
David Anson 2020-05-12 20:13:51 -07:00
parent f607a49a5b
commit ac5d52a3e3
3 changed files with 46 additions and 3 deletions

View file

@ -129,7 +129,7 @@ module.exports = {
// Back up one character so RegExp has a chance to match the
// next marker (ex: "**star**_underscore_")
emphasisRe.lastIndex--;
} else {
} else if (emphasisRe.lastIndex > 1) {
// Back up one character so RegExp has a chance to match the
// mis-matched marker (ex: "*text_*")
emphasisRe.lastIndex--;