Update MD033/no-inline-html to handle escaped backticks (fixes #193).

This commit is contained in:
David Anson 2019-06-04 23:19:49 -07:00
parent 5a142da87c
commit 73e70b76f3
2 changed files with 12 additions and 1 deletions

View file

@ -31,7 +31,8 @@ module.exports = {
!emailAddressRe.test(content)) {
const prefix = line.substring(0, match.index);
if (!linkDestinationRe.test(prefix) && !inlineCodeRe.test(prefix) &&
!unescapeMarkdown(prefix + "<", "_").endsWith("_")) {
!unescapeMarkdown(prefix + "<", "_").endsWith("_") &&
(unescapeMarkdown(prefix + "`", "_").match(/`/g).length % 2)) {
addError(onError, lineIndex + 1, "Element: " + element,
null, [ match.index + 1, tag.length ]);
}