From b3eb767656fe6dbb8c8dbf31746171cfb7b23b78 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Tue, 9 Jun 2020 16:22:44 +0800 Subject: [PATCH] Fix code comment --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 387c561..b8c4d38 100644 --- a/index.js +++ b/index.js @@ -6,7 +6,7 @@ module.exports = string => { } // Escape characters with special meaning either inside or outside character sets. - // Use a simple backslash escape when it’s always valid, and a \unnnn escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar. + // Use a simple backslash escape when it’s always valid, and a `\xnn` escape when the simpler form would be disallowed by Unicode patterns’ stricter grammar. return string .replace(/[|\\{}()[\]^$+*?.]/g, '\\$&') .replace(/-/g, '\\x2d');