From 853e90a1c19cc8e995dde3962cc1c09c64c319ee Mon Sep 17 00:00:00 2001 From: David Anson Date: Mon, 3 Jun 2019 22:32:04 -0700 Subject: [PATCH] Update MD033/no-inline-html to match specification for element names (fixes #188). --- lib/md033.js | 2 +- test/detailed-results-html-tags.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/md033.js b/lib/md033.js index 331c70a3..6bfa0516 100644 --- a/lib/md033.js +++ b/lib/md033.js @@ -6,7 +6,7 @@ const { addError, bareUrlRe, forEachLine, unescapeMarkdown } = require("../helpers"); const { lineMetadata } = require("./cache"); -const htmlElementRe = /<(([\w-]+)(?:[\s/][^>]*)?)>/g; +const htmlElementRe = /<(([A-Za-z][A-Za-z0-9-]*)(?:[\s/][^>]*)?)>/g; const linkDestinationRe = /]\(\s*$/; const inlineCodeRe = /^[^`]*(`+[^`]+`+[^`]+)*`+[^`]*$/; // See https://spec.commonmark.org/0.29/#autolinks diff --git a/test/detailed-results-html-tags.md b/test/detailed-results-html-tags.md index 86159a0b..0bbf4773 100644 --- a/test/detailed-results-html-tags.md +++ b/test/detailed-results-html-tags.md @@ -101,5 +101,7 @@ Text is an HTML element. But is not an autolink or HTML element. +And neither is . +Nor <123abc>. Text