Fix issue with MD044/proper-names where stateful RegExp could fail to match bare URLs, remove unnecessary use of bareUrlRe by MD033/no-inline-html.

This commit is contained in:
David Anson 2019-10-21 22:17:26 -07:00
parent 57c661700a
commit 31ffe52f0f
4 changed files with 51 additions and 5 deletions

View file

@ -24,7 +24,7 @@ module.exports = {
let match = null;
while ((match = anyNameRe.exec(line)) !== null) {
const fullMatch = match[0];
if (!bareUrlRe.test(fullMatch)) {
if (fullMatch.search(bareUrlRe) === -1) {
const wordMatch = fullMatch
.replace(/^\W*/, "").replace(/\W*$/, "");
if (!names.includes(wordMatch)) {