Skip to content

Commit ae8c743

Browse files
committed
tools: make internal link checker more robust
The internal link checker was missing some broken links because it was being too restrictive about the characters it accepted as part of a link hash. Accept anything that isn't a terminating quotation mark. Refs: nodejs#39426 Refs: nodejs#39425
1 parent 07e83f7 commit ae8c743

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

doc/api/http.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3183,7 +3183,7 @@ try {
31833183
[`net.Socket`]: net.md#net_class_net_socket
31843184
[`net.createConnection()`]: net.md#net_net_createconnection_options_connectlistener
31853185
[`new URL()`]: url.md#url_new_url_input_base
3186-
[`outgoingMessage.socket`]: #http_outgoingMessage.socket
3186+
[`outgoingMessage.socket`]: #http_outgoingmessage_socket
31873187
[`removeHeader(name)`]: #http_request_removeheader_name
31883188
[`request.destroy()`]: #http_request_destroy_error
31893189
[`request.end()`]: #http_request_end_data_encoding_callback

tools/doc/allhtml.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ fs.writeFileSync(new URL('./all.html', source), all, 'utf8');
7676

7777
// Validate all hrefs have a target.
7878
const ids = new Set();
79-
const idRe = / id="(\w+)"/g;
79+
const idRe = / id="([^"]+)"/g;
8080
let match;
8181
while (match = idRe.exec(all)) {
8282
ids.add(match[1]);
8383
}
8484

85-
const hrefRe = / href="#(\w+)"/g;
85+
const hrefRe = / href="#([^"]+)"/g;
8686
while (match = hrefRe.exec(all)) {
8787
if (!ids.has(match[1])) throw new Error(`link not found: ${match[1]}`);
8888
}

tools/doc/type-parser.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ const customTypesMap = {
9797
'EcKeyImportParams': 'webcrypto.html#webcrypto_class_eckeyimportparams',
9898
'HmacImportParams': 'webcrypto.html#webcrypto_class_hmacimportparams',
9999
'AesImportParams': 'webcrypto.html#webcrypto_class_aesimportparams',
100-
'Pbkdf2ImportParams': 'webcrypto.html#webcrypto_class.pbkdf2importparams',
100+
'Pbkdf2ImportParams': 'webcrypto.html#webcrypto_class_pbkdf2importparams',
101101
'HmacParams': 'webcrypto.html#webcrypto_class_hmacparams',
102102
'EcdsaParams': 'webcrypto.html#webcrypto_class_ecdsaparams',
103103
'RsaPssParams': 'webcrypto.html#webcrypto_class_rsapssparams',

0 commit comments

Comments
 (0)