diff options
author | Goraf <goraf@miranda-ng.org> | 2015-01-11 12:12:59 +0000 |
---|---|---|
committer | Goraf <goraf@miranda-ng.org> | 2015-01-11 12:12:59 +0000 |
commit | 5bbe7b48a9737806fa88c060b47de237ae9368cd (patch) | |
tree | c2359058c9c5e395f79365386673367118d8302f /tools/lpgen | |
parent | bb45fd7e47ece5278e7fbf8ba7dc8d65a32412bb (diff) |
lpgen: comment
git-svn-id: http://svn.miranda-ng.org/main/trunk@11828 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'tools/lpgen')
-rw-r--r-- | tools/lpgen/lpgen.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/lpgen/lpgen.js b/tools/lpgen/lpgen.js index 234dd15269..9bc8b469ab 100644 --- a/tools/lpgen/lpgen.js +++ b/tools/lpgen/lpgen.js @@ -454,10 +454,10 @@ function ParseSourceFile (FileTextVar,array) { while ((string = find.exec(FileTextVar)) != null) {
//first, init empty var
var string;
- //replace newlines with "" in second [1] subregexp ([\S\s]*?), and Delphi newlines "'#13#10+" replace
+ //replace newlines and all spaces and tabs between two pairs of " or ' with the void string ("") in first [1] subregexp ([\S\s]*?), and Delphi newlines "'#13#10+" replace
onestring=string[1].replace(/["']?(?:\#13\#10)*?\\?\r*\n(?:(?:\x20|\t)*['"])?/g,"");
- //trim single-line whitespaces
- trimedstring=onestring.replace(/[\s]*$/g,"");
+ //trim single-line whitespaces - multi-line parsing catches whitespaces after last " in single-line case
+ trimedstring=onestring.replace(/[\s]*$/g,"");
//remove trailing slash from the string. This is a tree item, slesh is a crap :)
noslashstring=trimedstring.replace(/\/(?=$)/g,"");
//remove first and last "
|