Skip to content

Commit

Permalink
add: hyperscript support
Browse files Browse the repository at this point in the history
  • Loading branch information
saemideluxe committed Dec 21, 2023
1 parent 356054c commit 7dc49c8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions htmlgenerator/htmltags.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,9 +738,10 @@ def flatattrs(attributes: dict, context: dict) -> str:
if value is None:
continue

if key[0] == "_":
key = key[1:]
key = key.replace("_", "-")
if key != "_":
if key[0] == "_":
key = key[1:]
key = key.replace("_", "-")
if isinstance(value, bool) and key != "value":
if value is True:
attlist.append(f"{conditional_escape(key)}")
Expand Down

0 comments on commit 7dc49c8

Please sign in to comment.