From 5bbe7b48a9737806fa88c060b47de237ae9368cd Mon Sep 17 00:00:00 2001 From: Goraf Date: Sun, 11 Jan 2015 12:12:59 +0000 Subject: lpgen: comment git-svn-id: http://svn.miranda-ng.org/main/trunk@11828 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- tools/lpgen/lpgen.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/lpgen') 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 " -- cgit v1.2.3