]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Ignore virtual tags
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 1 Jul 2021 13:06:50 +0000 (14:06 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 1 Jul 2021 13:06:50 +0000 (14:06 +0100)
src/libserver/html/html.cxx

index d5b58a7d48a8de8e23db8038286c6c7814bb80c4..6cd5aa24611941232b7814778d4c7b61e5467bef 100644 (file)
@@ -1786,10 +1786,14 @@ html_debug_structure(const html_content &hc) -> std::string
        if (hc.root_tag) {
                auto rec_functor = [&](const html_tag *t, int level, auto rec_functor) -> void {
                        std::string pluses(level, '+');
-                       output += fmt::format("{}{};", pluses,
-                                       html_tags_defs.name_by_id_safe(t->id));
+
+                       if (!(t->flags & (FL_VIRTUAL|FL_IGNORE))) {
+                               output += fmt::format("{}{};", pluses,
+                                               html_tags_defs.name_by_id_safe(t->id));
+                               level ++;
+                       }
                        for (const auto *cld : t->children) {
-                               rec_functor(cld, level + 1, rec_functor);
+                               rec_functor(cld, level, rec_functor);
                        }
                };