decrease the hash trigger to 150 (#1541)

This commit is contained in:
LawyZheng
2025-01-13 17:56:45 +08:00
committed by GitHub
parent 29120b4508
commit e10d9d46fb

View File

@@ -103,8 +103,8 @@ def json_to_html(element: dict, need_skyvern_attrs: bool = True) -> str:
context = skyvern_context.ensure_context()
# FIXME: Theoretically, all href links with over 69(64+1+4) length could be hashed
# but currently, just hash length>300 links to confirm the solution goes well
if "href" in attributes and len(attributes.get("href", "")) > 300:
# but currently, just hash length>150 links to confirm the solution goes well
if "href" in attributes and len(attributes.get("href", "")) > 150:
href = attributes.get("href", "")
# jinja style can't accept the variable name starts with number
# adding "_" to make sure the variable name is valid.