From 70cfe687ca4fd97a5de285fb43b8ee192c84cde0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Rodr=C3=ADguez=20Baquero?= Date: Wed, 6 Dec 2017 00:10:14 -0500 Subject: [PATCH] tools: replace space with \b in regex PR-URL: https://github.com/nodejs/node/pull/17479 Reviewed-By: Luigi Pinca Reviewed-By: Jon Moss Reviewed-By: James M Snell Reviewed-By: Rich Trott Reviewed-By: Colin Ihrig --- tools/doc/html.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/doc/html.js b/tools/doc/html.js index 1c44c5f7d3c239..f2d3fcdbba6860 100644 --- a/tools/doc/html.js +++ b/tools/doc/html.js @@ -416,7 +416,7 @@ const BSD_ONLY_SYSCALLS = new Set(['lchmod']); // 'open(2)' 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})`;