Skip to content

Commit

Permalink
tools: fix man pages linking regex
Browse files Browse the repository at this point in the history
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
  • Loading branch information
DiegoRBaquero committed Dec 18, 2017
1 parent 97cee72 commit 5af4822
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/doc/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ const BSD_ONLY_SYSCALLS = new Set(['lchmod']);
// '<a href="http://man7.org/linux/man-pages/man2/open.2.html">open(2)</a>'
function linkManPages(text) {
return text.replace(
/\b([a-z.]+)\((\d)([a-z]?)\)/gm,
/ ([a-z.]+)\((\d)([a-z]?)\)/gm,
(match, name, number, optionalCharacter) => {
// name consists of lowercase letters, number is a single digit
const displayAs = `${name}(${number}${optionalCharacter})`;
Expand Down

0 comments on commit 5af4822

Please sign in to comment.