Skip to content

Commit

Permalink
fix bug on HTML tree
Browse files Browse the repository at this point in the history
  • Loading branch information
LawyZheng committed Jul 6, 2024
1 parent e52d585 commit 3e28191
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion skyvern/webeye/scraper/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def json_to_html(element: dict) -> str:
)

# Check if the element is self-closing
if tag in ["img", "input", "br", "hr", "meta", "link"]:
if tag in ["img", "input", "br", "hr", "meta", "link"] and not option_html and not children_html:
return f'<{tag}{attributes_html if not attributes_html else " "+attributes_html}>'
else:
return f'<{tag}{attributes_html if not attributes_html else " "+attributes_html}>{text}{children_html+option_html}</{tag}>'
Expand Down

0 comments on commit 3e28191

Please sign in to comment.