Update MD033/no-inline-html to ignore elements with embedded forward slash (fixes #201).

This commit is contained in:
David Anson 2019-07-25 21:40:27 -07:00
parent 37236df18e
commit f81609d1bb
2 changed files with 5 additions and 1 deletions

View file

@ -6,7 +6,7 @@ const { addError, bareUrlRe, forEachLine, unescapeMarkdown } =
require("../helpers"); require("../helpers");
const { lineMetadata } = require("./cache"); const { lineMetadata } = require("./cache");
const htmlElementRe = /<(([A-Za-z][A-Za-z0-9-]*)(?:[\s/][^>]*)?)>/g; const htmlElementRe = /<(([A-Za-z][A-Za-z0-9-]*)(?:\s[^>]*)?)(?:\/>|>)/g;
const linkDestinationRe = /]\(\s*$/; const linkDestinationRe = /]\(\s*$/;
const inlineCodeRe = /^[^`]*(`+[^`]+`+[^`]+)*`+[^`]*$/; const inlineCodeRe = /^[^`]*(`+[^`]+`+[^`]+)*`+[^`]*$/;
// See https://spec.commonmark.org/0.29/#autolinks // See https://spec.commonmark.org/0.29/#autolinks

View file

@ -21,3 +21,7 @@ Text \` text `<code>` text `<code>` text
Text \` text `<code>` text \` text `<code>` text Text \` text `<code>` text \` text `<code>` text
Text \`\` text `<code>` text Text \`\` text `<code>` text
Text `<code>` text \` text `<code>` text Text `<code>` text \` text `<code>` text
## Slash in element name
Text **\<base directory>\another\directory\\<slash/directory>** text