deep copy the attribute to avoid duplicated (#345)

This commit is contained in:
LawyZheng
2024-05-20 15:05:45 +08:00
committed by GitHub
parent b6d25dff8c
commit 5acdddf67e

View File

@@ -75,7 +75,7 @@ def build_attribute(key: str, value: Any) -> str:
def json_to_html(element: dict) -> str:
attributes: dict[str, Any] = element.get("attributes", {})
attributes: dict[str, Any] = copy.deepcopy(element.get("attributes", {}))
# adding the node attribute to attributes
for attr in ELEMENT_NODE_ATTRIBUTES: