diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-08-07 11:41:28 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2023-08-07 11:41:28 +0100 |
commit | 662145d0554de5e769b92dab2d41173a98adcee5 (patch) | |
tree | ec28311a0bce6181f248ba7b50304293ad764e44 /lualib/lua_content/init.lua | |
parent | bbd88232db43d18f5e0de5a6502848d4074621c5 (diff) | |
download | rspamd-662145d0554de5e769b92dab2d41173a98adcee5.tar.gz rspamd-662145d0554de5e769b92dab2d41173a98adcee5.zip |
[Minor] Reformat all Lua code, no functional changes
Diffstat (limited to 'lualib/lua_content/init.lua')
-rw-r--r-- | lualib/lua_content/init.lua | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/lualib/lua_content/init.lua b/lualib/lua_content/init.lua index 1a13311b1..701d223a5 100644 --- a/lualib/lua_content/init.lua +++ b/lualib/lua_content/init.lua @@ -26,21 +26,21 @@ local lua_util = require "lua_util" local content_modules = { ical = { - mime_type = {"text/calendar", "application/calendar"}, + mime_type = { "text/calendar", "application/calendar" }, module = require "lua_content/ical", - extensions = {'ics'}, + extensions = { 'ics' }, output = "text" }, vcf = { - mime_type = {"text/vcard", "application/vcard"}, + mime_type = { "text/vcard", "application/vcard" }, module = require "lua_content/vcard", - extensions = {'vcf'}, + extensions = { 'vcf' }, output = "text" }, pdf = { mime_type = "application/pdf", module = require "lua_content/pdf", - extensions = {'pdf'}, + extensions = { 'pdf' }, output = "table" }, } @@ -51,20 +51,20 @@ local modules_by_extension local function init() modules_by_mime_type = {} modules_by_extension = {} - for k,v in pairs(content_modules) do + for k, v in pairs(content_modules) do if v.mime_type then if type(v.mime_type) == 'table' then - for _,mt in ipairs(v.mime_type) do - modules_by_mime_type[mt] = {k, v} + for _, mt in ipairs(v.mime_type) do + modules_by_mime_type[mt] = { k, v } end else - modules_by_mime_type[v.mime_type] = {k, v} + modules_by_mime_type[v.mime_type] = { k, v } end end if v.extensions then - for _,ext in ipairs(v.extensions) do - modules_by_extension[ext] = {k, v} + for _, ext in ipairs(v.extensions) do + modules_by_extension[ext] = { k, v } end end end @@ -106,5 +106,4 @@ exports.maybe_process_mime_part = function(part, task) end - return exports
\ No newline at end of file |