This commit is contained in:
Egor Svitin
2023-08-11 12:05:29 +03:00
parent d9588552fa
commit 947b19ba1a

View File

@@ -75,8 +75,9 @@ class HtmlPresetsProcessor:
@staticmethod @staticmethod
def _wrap_tag(**kwargs): def _wrap_tag(**kwargs):
dict_attributes = {attr["name"]: attr["value"] for attr in kwargs["rule"]["tag_to_wrap"]["attrs"]}
kwargs["found_tag"].wrap(kwargs["body_tag"].new_tag( kwargs["found_tag"].wrap(kwargs["body_tag"].new_tag(
kwargs["rule"]["tag_to_wrap"]["name"])) kwargs["rule"]["tag_to_wrap"]["name"]), attrs=dict_attributes)
@staticmethod @staticmethod
def set_attrs_to_parent(tag, parent_tag): def set_attrs_to_parent(tag, parent_tag):