Update previous commit for MD051/link-fragments to rename, refactor, add support for HTML anchors, and validate against

markdown-link-check (fixes #253).
This commit is contained in:
David Anson 2022-04-10 05:37:57 +00:00
parent 33ee1cd85e
commit db5d9f6dbb
21 changed files with 355 additions and 181 deletions

View file

@ -3,11 +3,10 @@
"use strict";
const {
addError, forEachLine, overlapsAnyRange, unescapeMarkdown
addError, forEachLine, htmlElementRe, overlapsAnyRange, unescapeMarkdown
} = require("../helpers");
const { codeBlockAndSpanRanges, lineMetadata } = require("./cache");
const htmlElementRe = /<(([A-Za-z][A-Za-z0-9-]*)(?:\s[^>]*)?)\/?>/g;
const linkDestinationRe = /]\(\s*$/;
// See https://spec.commonmark.org/0.29/#autolinks
const emailAddressRe =