Skip to content

Commit 9c4e7a5

Browse files
Trotttargos
authored andcommitted
tools: fix lint-md autolinking
Update a transitive dependency in lint-md to fix an autolink bug in the formatter that causes a lot of our files (particularly changelogs) to be misformatted when run through the automatic formatter. Refs: syntax-tree/mdast-util-gfm-autolink-literal@7555d45 PR-URL: #40181 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Daijiro Wachi <[email protected]>
1 parent 26db6db commit 9c4e7a5

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

tools/lint-md/lint-md.mjs

+6-2
Original file line numberDiff line numberDiff line change
@@ -27475,8 +27475,12 @@ function findUrl(_, protocol, domain, path, match) {
2747527475
* @param {RegExpMatchObject} match
2747627476
*/
2747727477
function findEmail(_, atext, label, match) {
27478-
// Not an expected previous character.
27479-
if (!previous(match, true) || /[_-]$/.test(label)) {
27478+
if (
27479+
// Not an expected previous character.
27480+
!previous(match, true) ||
27481+
// Label ends in not allowed character.
27482+
/[_-\d]$/.test(label)
27483+
) {
2748027484
return false
2748127485
}
2748227486

tools/lint-md/package-lock.json

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)