diff --git a/lib/links.js b/lib/links.js index ad498b8a..91d06fe2 100644 --- a/lib/links.js +++ b/lib/links.js @@ -1,8 +1,8 @@ import cheerio from 'cheerio'; -const FIXES_RE = /(Close[ds]?|Fix(e[ds])?|Resolve[sd]?)\s*:\s*(\S+)/mgi; +const FIXES_RE = /^\s*(Close[ds]?|Fix(e[ds])?|Resolve[sd]?)\s*:\s*(\S+)/mgi; const FIX_RE = /(Close[ds]?|Fix(e[ds])?|Resolve[sd]?)\s*:\s*(\S+)/i; -const REFS_RE = /Refs?\s*:\s*(\S+)/mgi; +const REFS_RE = /^\s*Refs?\s*:\s*(\S+)/mgi; const REF_RE = /Refs?\s*:\s*(\S+)/i; const PR_RE = /PR-URL\s*:\s*(\S+)/i; diff --git a/test/fixtures/op_html.json b/test/fixtures/op_html.json index 3b604565..784eb6d4 100644 --- a/test/fixtures/op_html.json +++ b/test/fixtures/op_html.json @@ -2,5 +2,6 @@ "

The npm install rules had a hidden dependency on the node binary
\ninstall rule creating the $PREFIX/bin directory.

\n

Because with ./configure --shared no binary is created, the rule
\nsubsequently failed. Fix that by creating the directory before
\ncreating the symlinks to the npm and npx scripts.

\n

(Whether it makes sense to install npm without a node binary is
\na separate question. This commit is not taking positions. :-))

\n

Regression introduced in commit ed8c89a (\"build: fix shared installing
\ntarget\") which, as the commit log indicates, was itself a bug fix for
\nthe ./configure --shared install.

\n

Fixes: #16437
\nRefs: #15148

", "

Refs: #16293

\n
Checklist
\n\n\n
Affected core subsystem(s)
\n\n

vm

", "

Included reference to \\'constant time\\' in crypto.timingSafeEqual description

\n

Fixes : #16504

", - "
Checklist
Affected core subsystem(s)

doc, dgram

Refs: https://en.wikipedia.org/w/index.php?title=IPv6_address&type=revision&diff=809494791&oldid=804196124

" + "
Checklist
\n\n
Affected core subsystem(s)
\n

doc, dgram

\n

Refs: https://en.wikipedia.org/w/index.php?title=IPv6_address&type=revision&diff=809494791&oldid=804196124

", + "

v8.5.5 (2022-03-17)

\n

Bug Fixes

\n\n

Documentation

\n\n

Dependencies

\n" ] diff --git a/test/unit/links.test.js b/test/unit/links.test.js index f95ddcd5..6c281b64 100644 --- a/test/unit/links.test.js +++ b/test/unit/links.test.js @@ -18,8 +18,15 @@ describe('LinkParser', () => { fixes: ['https://github.com/nodejs/node/issues/16504'], refs: [] }, { + // Parse non-GitHub refs. + // https://github.com/nodejs/node/pull/17107 fixes: [], refs: ['https://en.wikipedia.org/w/index.php?title=IPv6_address&type=revision&diff=809494791&oldid=804196124'] + }, { + // Parse npm update pull requests. + // https://github.com/nodejs/node/pull/42382 + fixes: [], + refs: [] }]; for (let i = 0; i < htmls.length; ++i) {