diff --git a/lib/md033.js b/lib/md033.js index 2cfdc6b0..a36870b7 100644 --- a/lib/md033.js +++ b/lib/md033.js @@ -30,11 +30,13 @@ module.exports = { !tag.endsWith("\\>") && !bareUrlRe.test(content) && !emailAddressRe.test(content)) { const prefix = line.substring(0, match.index); - if (!linkDestinationRe.test(prefix) && !inlineCodeRe.test(prefix) && - !unescapeMarkdown(prefix + "<", "_").endsWith("_") && - (unescapeMarkdown(prefix + "`", "_").match(/`/g).length % 2)) { - addError(onError, lineIndex + 1, "Element: " + element, - null, [ match.index + 1, tag.length ]); + if (!linkDestinationRe.test(prefix) && !inlineCodeRe.test(prefix)) { + const unescaped = unescapeMarkdown(prefix + "<", "_"); + if (!unescaped.endsWith("_") && + ((unescaped + "`").match(/`/g).length % 2)) { + addError(onError, lineIndex + 1, "Element: " + element, + null, [ match.index + 1, tag.length ]); + } } } }