Skip to content

Commit

Permalink
tools: replace space with \b in regex
Browse files Browse the repository at this point in the history
PR-URL: #17479
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
DiegoRBaquero authored and MylesBorins committed Dec 12, 2017
1 parent 6116c3a commit 2e1a526
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(
/ ([a-z.]+)\((\d)([a-z]?)\)/gm,
/\b([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 2e1a526

Please sign in to comment.