diff options
author | Basil <basil@miranda-ng.org> | 2013-03-11 13:34:43 +0000 |
---|---|---|
committer | Basil <basil@miranda-ng.org> | 2013-03-11 13:34:43 +0000 |
commit | f01a47f097c67d7636cda151e0681a4eb538aa32 (patch) | |
tree | daf7da281d175c0dacae51cee039776e675a6660 /tools/lpgen/lpgen.js | |
parent | c2edf10f8ba2fe226eb50bb44da0852ef120a59d (diff) |
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
Diffstat (limited to 'tools/lpgen/lpgen.js')
-rw-r--r-- | tools/lpgen/lpgen.js | 4 |
1 files changed, 3 insertions, 1 deletions
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 :)
|