From 27d54da3f6c7801edea15cdf9d00f9956f7f87bf Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 29 Jul 2021 13:02:41 +0100 Subject: [PATCH] [Minor] Improve html tags structure display --- lualib/rspamadm/mime.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lualib/rspamadm/mime.lua b/lualib/rspamadm/mime.lua index 8bd2478c8..764d4f325 100644 --- a/lualib/rspamadm/mime.lua +++ b/lualib/rspamadm/mime.lua @@ -385,8 +385,8 @@ local function extract_handler(opts) if opts.structure then local hc = part:get_html() local res = {} - process_func = function(k, v) - return rspamd_logger.slog("%s = %s", k, v) + process_func = function(elt) + return rspamd_logger.slog("%s", elt) end hc:foreach_tag('any', function(tag) @@ -400,6 +400,10 @@ local function extract_handler(opts) if content then elt.content = tostring(content) end + local style = tag:get_style() + if style then + elt.style = style + end table.insert(res, elt) end) out_elts[fname] = res -- 2.39.5