commit 034d186: [Fix] Ical: Fix identation grammar

Vsevolod Stakhov vsevolod at highsecure.ru
Mon Jun 29 16:21:06 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-06-29 17:17:23 +0100
URL: https://github.com/rspamd/rspamd/commit/034d18670b8ec22a21bb54c967f11d329f9ab98e (HEAD -> master)

[Fix] Ical: Fix identation grammar

---
 lualib/lua_content/ical.lua | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lualib/lua_content/ical.lua b/lualib/lua_content/ical.lua
index bb2f52771..ed9a87cc5 100644
--- a/lualib/lua_content/ical.lua
+++ b/lualib/lua_content/ical.lua
@@ -22,12 +22,12 @@ local ical_grammar
 
 local function gen_grammar()
   if not ical_grammar then
-    local wsp = l.P" "
+    local wsp = l.S(" \t\v\f")
     local crlf = l.P"\r"^-1 * l.P"\n"
     local eol = (crlf * #crlf) + (crlf - (crlf^-1 * wsp))
     local name = l.C((l.P(1) - (l.P":"))^1) / function(v) return (v:gsub("[\n\r]+%s","")) end
     local value = l.C((l.P(1) - eol)^0) / function(v) return (v:gsub("[\n\r]+%s","")) end
-    ical_grammar = name * ":" * wsp^0 * value * eol
+    ical_grammar = name * ":" * wsp^0 * value * eol^-1
   end
 
   return ical_grammar


More information about the Commits mailing list