FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

tools: fix man pages linking regex by DiegoRBaquero · Pull Request #17724 · nodejs/node · GitHub

/ node Public

tools: fix man pages linking regex - #17724

Closed
DiegoRBaquero wants to merge 4 commits into
nodejs:masterfrom
DiegoRBaquero:patch-1
Closed

tools: fix man pages linking regex#17724
DiegoRBaquero wants to merge 4 commits into
nodejs:masterfrom
DiegoRBaquero:patch-1

Conversation

Copy link
Copy Markdown
Contributor

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

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
nodejs-github-bot added doc Issues and PRs related to the documentations. tools Issues and PRs related to the tools directory. labels Dec 18, 2017
DiegoRBaquero added a commit to DiegoRBaquero/node that referenced this pull request Dec 18, 2017
This add the space needed to match the man pages linking regex.

Refs: nodejs#17724

Trott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I don't think this should be reverted. Rather the regular expression should be refined. Will comment more...

Trott commented Dec 18, 2017
edited
Loading

Copy link
Copy Markdown
Member

Maybe replace word boundary \b with an allowance for spaces or the beginning of a line (^|\s). That will stop it from replacing if the word break is a non-alpha symbol like [ and ( but still work at the start of a line.

lpinca commented Dec 18, 2017

Copy link
Copy Markdown
Member

@Trott's suggestion sounds good. In addition to that we should replace the space with the value of the first capturing group (^|\s)in the returned string.

Copy link
Copy Markdown
Contributor Author

@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
Comment thread 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}` +

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think beginning should be used here, replacing the space.

Trott Dec 19, 2017
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

@lpinca Same applies to line 427 too? Or am I mistaken about that?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

yes, that's correct.

This moves the beginning regex matching group to the beginning of the resulting HTML man pages link

Copy link
Copy Markdown
Contributor Author

@Trott @lpinca Updated

Trott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM if CI is ok

lpinca commented Dec 20, 2017

Copy link
Copy Markdown
Member

Copy link
Copy Markdown
Contributor

Landing for now as fixes main generation issue. Just noting for posterity that the curl and uname links referenced in #17637 are still broken, but it's for a different reason.

maclover7 self-assigned this Dec 22, 2017

maclover7 commented Dec 22, 2017
edited
Loading

Copy link
Copy Markdown
Contributor

Landed in 66e6aff

maclover7 closed this Dec 22, 2017

Copy link
Copy Markdown
Contributor

@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.

Copy link
Copy Markdown
Contributor

@vsemozhetbyt I think our comments crossed -- see #17637 (comment)

DiegoRBaquero deleted the patch-1 branch December 23, 2017 23:53
MylesBorins pushed a commit that referenced this pull request Jan 8, 2018
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>
MylesBorins pushed a commit that referenced this pull request Jan 9, 2018
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>
MylesBorins pushed a commit that referenced this pull request Jan 9, 2018
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>
MylesBorins mentioned this pull request Jan 10, 2018

Copy link
Copy Markdown
Contributor

cc @nodejs/lts: Can this be backported to v8 branch?
See #17694 (comment)

This was referenced Jan 22, 2018
gibfahn pushed a commit that referenced this pull request Jan 24, 2018
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>

gibfahn commented Jan 24, 2018

Copy link
Copy Markdown
Member

cc @nodejs/lts: Can this be backported to v8 branch?

Done. I assume it doesn't need to go back to the v6.x branch.

Copy link
Copy Markdown
Contributor

@gibfahn Yes, it seems v6.x docs do not have this issue.

gibfahn pushed a commit that referenced this pull request Jan 24, 2018
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations. tools Issues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants


Back | FazBrowse Home | New Git URL