From 1371d3a672ac1deeed94131dc25009a684dee8d7 Mon Sep 17 00:00:00 2001 From: Benjamin Zaslavsky Date: Fri, 24 Nov 2017 11:54:43 +0100 Subject: [PATCH 1/2] links: removed unused class, allows parsing non github refs Fixes: https://github.com/nodejs/node-core-utils/issues/117 --- lib/links.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/links.js b/lib/links.js index 1150d42d..8ba41672 100644 --- a/lib/links.js +++ b/lib/links.js @@ -45,7 +45,7 @@ class LinkParser { // Do this so we can reliably get the correct url. // Otherwise, the number could reference a PR or an issue. getRefUrlFromOP(ref) { - const as = this.OP.querySelectorAll('a.issue-link'); + const as = this.OP.querySelectorAll('a'); const links = Array.from(as); for (const link of links) { const text = link.textContent; From b79d994e5562bb56e878086a00da0e6f9b6def21 Mon Sep 17 00:00:00 2001 From: Benjamin Zaslavsky Date: Tue, 28 Nov 2017 12:05:48 +0100 Subject: [PATCH 2/2] test: added test for new refs parsing --- test/fixtures/op_html.json | 3 ++- test/unit/links.test.js | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/test/fixtures/op_html.json b/test/fixtures/op_html.json index 41fba9d7..3b604565 100644 --- a/test/fixtures/op_html.json +++ b/test/fixtures/op_html.json @@ -1,5 +1,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

" + "

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

" ] diff --git a/test/unit/links.test.js b/test/unit/links.test.js index 000a7b48..95ad92d8 100644 --- a/test/unit/links.test.js +++ b/test/unit/links.test.js @@ -14,6 +14,9 @@ const expected = [{ }, { fixes: ['https://github.com/nodejs/node/issues/16504'], refs: [] +}, { + fixes: [], + refs: ['https://en.wikipedia.org/w/index.php?title=IPv6_address&type=revision&diff=809494791&oldid=804196124'] }]; describe('LinkParser', () => {