Skip to content

Commit

Permalink
tools: fix lint-md autolinking
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Trott committed Sep 25, 2021
1 parent f981a58 commit ef0eeb3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
8 changes: 6 additions & 2 deletions tools/lint-md/lint-md.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -27475,8 +27475,12 @@ function findUrl(_, protocol, domain, path, match) {
* @param {RegExpMatchObject} match
*/
function findEmail(_, atext, label, match) {
// Not an expected previous character.
if (!previous(match, true) || /[_-]$/.test(label)) {
if (
// Not an expected previous character.
!previous(match, true) ||
// Label ends in not allowed character.
/[_-\d]$/.test(label)
) {
return false
}

Expand Down
12 changes: 6 additions & 6 deletions tools/lint-md/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ef0eeb3

Please sign in to comment.