From f01a47f097c67d7636cda151e0681a4eb538aa32 Mon Sep 17 00:00:00 2001 From: Basil Date: Mon, 11 Mar 2013 13:34:43 +0000 Subject: remove trailing slashes from end of string. Useful for tree items git-svn-id: http://svn.miranda-ng.org/main/trunk@3974 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- tools/lpgen/lpgen.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tools/lpgen/lpgen.js') diff --git a/tools/lpgen/lpgen.js b/tools/lpgen/lpgen.js index 9e778945a0..0f59a90e83 100644 --- a/tools/lpgen/lpgen.js +++ b/tools/lpgen/lpgen.js @@ -439,8 +439,10 @@ function ParseSourceFile (FileTextVar,array) { 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,""); + //remove trailing slash from the string. This is a tree item, slesh is a crap :) + noslashstring=onestring.replace(/\/(?=$)/g,""); //remove escape slashes before ' and " - stringtolangpack=onestring.replace(/\\(['"])/g,"$1"); + stringtolangpack=noslashstring.replace(/\\(['"])/g,"$1"); //if our string still exist, and length more than 1 symbol (nothing to translate if only one symbol) if (stringtolangpack.length>1) { //brand new _T() crap filtering engine :) -- cgit v1.2.3