tools: fix man pages linking regex#17724
tools: fix man pages linking regex#17724DiegoRBaquero wants to merge 4 commits intonodejs:masterfrom
Conversation
The change to word boundary was breaking many doc pages. This reverts the word boundary back to space. Fixes: nodejs#17637 Fixes: nodejs#17694 Refs: nodejs#17479
This add the space needed to match the man pages linking regex. Refs: nodejs#17724
Trott
left a comment
There was a problem hiding this comment.
I don't think this should be reverted. Rather the regular expression should be refined. Will comment more...
|
Maybe replace word boundary |
|
@Trott's suggestion sounds good. In addition to that we should replace the space with the value of the first capturing group |
|
@lpinca Indeed it would be needed, else a space would be removed. |
The change to word boundary was breaking many doc pages. This replace the word boundary with a matching group of space or beginning of line. Fixes: nodejs#17637 Fixes: nodejs#17694 Refs: nodejs#17479
tools/doc/html.js
Outdated
| const displayAs = `${beginning}${name}(${number}${optionalCharacter})`; | ||
| if (BSD_ONLY_SYSCALLS.has(name)) { | ||
| return ` <a href="https://www.freebsd.org/cgi/man.cgi?query=${name}` + | ||
| return `<a href="https://www.freebsd.org/cgi/man.cgi?query=${name}` + |
There was a problem hiding this comment.
I think beginning should be used here, replacing the space.
There was a problem hiding this comment.
@lpinca Same applies to line 427 too? Or am I mistaken about that?
This moves the beginning regex matching group to the beginning of the resulting HTML man pages link
|
Landing for now as fixes main generation issue. Just noting for posterity that the |
|
Landed in 66e6aff |
|
@maclover7 Hmm. The links referenced in #17637 seem to not match the new RegExp, so they should not be erroneously double-linkified now if I do not miss something. |
|
@vsemozhetbyt I think our comments crossed -- see #17637 (comment) |
The change to word boundary was breaking many doc pages. This reverts the word boundary back to space. PR-URL: #17724 Fixes: #17694 Refs: #17479 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
The change to word boundary was breaking many doc pages. This reverts the word boundary back to space. PR-URL: #17724 Fixes: #17694 Refs: #17479 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
The change to word boundary was breaking many doc pages. This reverts the word boundary back to space. PR-URL: #17724 Fixes: #17694 Refs: #17479 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
|
cc @nodejs/lts: Can this be backported to v8 branch? |
The change to word boundary was breaking many doc pages. This reverts the word boundary back to space. PR-URL: #17724 Fixes: #17694 Refs: #17479 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Done. I assume it doesn't need to go back to the v6.x branch. |
|
@gibfahn Yes, it seems v6.x docs do not have this issue. |
The change to word boundary was breaking many doc pages. This reverts the word boundary back to space. PR-URL: #17724 Fixes: #17694 Refs: #17479 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
The change to word boundary was breaking many doc pages. This reverts the word boundary back to space.
Fixes: #17637
Fixes: #17694
Refs: #17479
Affected core subsystem(s)
tools, doc