summaryrefslogtreecommitdiff
path: root/tools/license2rtf.js
diff options
context:
space:
mode:
authorPrince J Wesley <princejohnwesley@gmail.com>2016-11-14 12:53:35 +0530
committerRich Trott <rtrott@gmail.com>2016-11-23 22:06:24 -0800
commit0f4c7b8c371caae4cd4a2cb1fa03d2079f75663d (patch)
tree116e98d6218afb2472fb9443bfecf3b0694623b8 /tools/license2rtf.js
parentc1133f41b6566bc9ce25d4ac0b83f038ccdacc71 (diff)
downloadandroid-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.js4
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() {