From: Vsevolod Stakhov Date: Mon, 29 Jun 2020 16:17:23 +0000 (+0100) Subject: [Fix] Ical: Fix identation grammar X-Git-Tag: 2.6~281 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=034d18670b8ec22a21bb54c967f11d329f9ab98e;p=thirdparty%2Frspamd.git [Fix] Ical: Fix identation grammar --- diff --git a/lualib/lua_content/ical.lua b/lualib/lua_content/ical.lua index bb2f52771a..ed9a87cc52 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