From 25359ca57da5cc1dd5d6e34ca7b5bd65353f092a Mon Sep 17 00:00:00 2001 From: Basil Date: Thu, 14 Feb 2013 12:30:56 +0000 Subject: multi-line stings parsing update, now trailing slash before end of line removed git-svn-id: http://svn.miranda-ng.org/main/trunk@3599 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- tools/lpgen/lpgen.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/lpgen') diff --git a/tools/lpgen/lpgen.js b/tools/lpgen/lpgen.js index 88f4fc9ed6..b4bfd7f415 100644 --- a/tools/lpgen/lpgen.js +++ b/tools/lpgen/lpgen.js @@ -417,7 +417,7 @@ function ParseRCFile(RC_File,array) { //read on line into rcline rcline=RC_File_stream.ReadLine(); //find string to translate in rcline by regexp - rc_regexp=rcline.match(/\s*(?:CONTROL|(?:DEF)?PUSHBUTTON|[LRC]TEXT|AUTORADIOBUTTON|GROUPBOX|(?:AUTO)?CHECKBOX|CAPTION|MENUITEM|POPUP)\s*"((?:(?:""[^"]+?"")*[^"]*?)*)"\s*?(,|$)/); + rc_regexp=rcline.match(/\s*(?:CONTROL|(?:DEF)?PUSHBUTTON|[LRC]TEXT|AUTORADIOBUTTON|GROUPBOX|(?:AUTO)?CHECKBOX|CAPTION|MENUITEM|POPUP)\s*"((?:(?:""[^"]+?"")*[^"]*?)*)"\s*?(,|$|\\)/); // if exist rc_regexp, do checks, double "" removal and add strings into array if (rc_regexp) { // check for some garbage like "List1","Tab1" etc. in *.rc files, we do not need this. @@ -468,7 +468,7 @@ function ParseSourceFile (SourceFile,array) { //first, init empty var var string; //replace newlines with "" in second [1] subregexp ([\S\s]*?), and Delphi newlines "'#13#10+" replace - onestring=string[2].replace(/'?(\#13\#10)*?\+?\r\n(\x20*?\')?/g,""); + onestring=string[2].replace(/'?(\#13\#10)*?\\?\r\n(\x20*?\')?/g,""); //remove escape slashes before ' and " stringtolangpack=onestring.replace(/\\(['"])/g,"$1"); //if our string still exist, and length more than 2 symbol (nothing to translate if only two symbols, well, except No and OK, but they are in core. But dozens crap with variables are filtered) -- cgit v1.2.3