Skip to content

Conversation

@DiegoRBaquero
Copy link
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#17637Fixes: nodejs#17694 Refs: nodejs#17479
@nodejs-github-botnodejs-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
@DiegoRBaqueroDiegoRBaquero mentioned this pull request Dec 18, 2017
2 tasks
Copy link
Member

@TrottTrott left a comment

Choose a reason for hiding this comment

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

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

@Trott
Copy link
Member

Trott commented Dec 18, 2017

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
Copy link
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.

@DiegoRBaquero
Copy link
ContributorAuthor

@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#17637Fixes: nodejs#17694 Refs: nodejs#17479
constdisplayAs=`${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
Member

Choose a reason for hiding this comment

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

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

Copy link
Member

@TrottTrottDec 19, 2017

Choose a reason for hiding this comment

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

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

Copy link
Member

Choose a reason for hiding this comment

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

yes, that's correct.

This moves the beginning regex matching group to the beginning of the resulting HTML man pages link
@DiegoRBaquero
Copy link
ContributorAuthor

@Trott@lpinca Updated

Copy link
Member

@TrottTrott left a comment

Choose a reason for hiding this comment

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

LGTM if CI is ok

@lpinca
Copy link
Member

@maclover7
Copy link
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.

@maclover7maclover7 self-assigned this Dec 22, 2017
@maclover7
Copy link
Contributor

maclover7 commented Dec 22, 2017

Landed in 66e6aff

@vsemozhetbyt
Copy link
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.

@maclover7
Copy link
Contributor

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

@DiegoRBaqueroDiegoRBaquero 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: #17724Fixes: #17694 Refs: #17479 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
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: #17724Fixes: #17694 Refs: #17479 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
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: #17724Fixes: #17694 Refs: #17479 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
@MylesBorinsMylesBorins mentioned this pull request Jan 10, 2018
@vsemozhetbyt
Copy link
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: #17724Fixes: #17694 Refs: #17479 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
@gibfahn
Copy link
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.

@vsemozhetbyt
Copy link
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: #17724Fixes: #17694 Refs: #17479 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docIssues and PRs related to the documentations.toolsIssues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@DiegoRBaquero@Trott@lpinca@maclover7@vsemozhetbyt@gibfahn@jasnell@gireeshpunathil@MylesBorins@nodejs-github-bot