diff options
author | Prince J Wesley <princejohnwesley@gmail.com> | 2016-11-14 12:53:35 +0530 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2016-11-23 22:06:24 -0800 |
commit | 0f4c7b8c371caae4cd4a2cb1fa03d2079f75663d (patch) | |
tree | 116e98d6218afb2472fb9443bfecf3b0694623b8 /tools/license2rtf.js | |
parent | c1133f41b6566bc9ce25d4ac0b83f038ccdacc71 (diff) | |
download | android-node-v8-0f4c7b8c371caae4cd4a2cb1fa03d2079f75663d.tar.gz android-node-v8-0f4c7b8c371caae4cd4a2cb1fa03d2079f75663d.tar.bz2 android-node-v8-0f4c7b8c371caae4cd4a2cb1fa03d2079f75663d.zip |
lib,tools: remove unneeded escaping of /
The `/` character does not need to be escaped when occurring inside a
character class in a regular expression. Remove such instances of
escaping in the code base.
PR-URL: https://github.com/nodejs/node/pull/9591
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Diffstat (limited to 'tools/license2rtf.js')
-rw-r--r-- | tools/license2rtf.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/license2rtf.js b/tools/license2rtf.js index 694e1c6050..4b3d71fe5b 100644 --- a/tools/license2rtf.js +++ b/tools/license2rtf.js @@ -122,7 +122,7 @@ function ParagraphParser() { // Detect separator "lines" within a block. These mark a paragraph break // and are stripped from the output. - if (/^\s*[=*\-]{5,}\s*$/.test(line)) { + if (/^\s*[=*-]{5,}\s*$/.test(line)) { flushParagraph(); return; } @@ -286,7 +286,7 @@ function RtfGenerator() { function rtfEscape(string) { return string - .replace(/[\\\{\}]/g, function(m) { + .replace(/[\\{}]/g, function(m) { return '\\' + m; }) .replace(/\t/g, function() { |