diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-12-16 17:51:12 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-12-16 17:51:12 +0000 |
commit | 776f8b34704c2caa35d09ae6b9a58249cd8fe463 (patch) | |
tree | 7bc06742c75d1eb3622ded98ad9c4533e6770888 | |
parent | 2058ed81f484b3dfc3a1495cdba84f6f2114abb1 (diff) | |
download | rspamd-776f8b34704c2caa35d09ae6b9a58249cd8fe463.tar.gz rspamd-776f8b34704c2caa35d09ae6b9a58249cd8fe463.zip |
Skip unnecessary stuff in lua preprocessing
-rw-r--r-- | src/rspamadm/lua_preprocess.pl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rspamadm/lua_preprocess.pl b/src/rspamadm/lua_preprocess.pl index 4a84689a4..b17994684 100644 --- a/src/rspamadm/lua_preprocess.pl +++ b/src/rspamadm/lua_preprocess.pl @@ -15,6 +15,9 @@ sub quote_file { quote_file($inc, $out); } else { + s/^\s*//; # remove unnecessary spaces at the beginning + next if /^--/; # skip comments + next if /^\s*$/; # skip empty lines s/(.)/'$1',/g; # split as 'c', s/\'\\\'/\'\\\\'/g; # escape backslashes s/\'\'\'/\'\\\'\'/g; # escape single quotes |