diff --git a/lib/md033.js b/lib/md033.js index 6bfa0516..2cfdc6b0 100644 --- a/lib/md033.js +++ b/lib/md033.js @@ -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 ]); } diff --git a/test/inline_html.md b/test/inline_html.md index 90ddd406..70a98403 100644 --- a/test/inline_html.md +++ b/test/inline_html.md @@ -11,3 +11,13 @@ but this time on multiple lines ```text

Neither should this as it's also in a code block {MD046:11}

``` + +## Elements in code spans + +Text `` text \` text +Text \` text `` text +Text \` text \` text `` text +Text \` text `` text `` text +Text \` text `` text \` text `` text +Text \`\` text `` text +Text `` text \` text `` text