skip large size svg (#869)

Co-authored-by: LawyZheng <lawyzheng1106@gmail.com>
This commit is contained in:
Shuchang Zheng
2024-09-20 19:21:00 -07:00
committed by GitHub
parent aedaeb4433
commit 76a256ffaa
3 changed files with 23 additions and 0 deletions

View File

@@ -86,6 +86,12 @@ def build_attribute(key: str, value: Any) -> str:
def json_to_html(element: dict, need_skyvern_attrs: bool = True) -> str:
"""
if element is flagged as dropped, the html format is empty
"""
if element.get("isDropped", False):
return ""
attributes: dict[str, Any] = copy.deepcopy(element.get("attributes", {}))
if need_skyvern_attrs: