Skip to content

Commit 7dc49c8

Browse files
committed
add: hyperscript support
1 parent 356054c commit 7dc49c8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

htmlgenerator/htmltags.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -738,9 +738,10 @@ def flatattrs(attributes: dict, context: dict) -> str:
738738
if value is None:
739739
continue
740740

741-
if key[0] == "_":
742-
key = key[1:]
743-
key = key.replace("_", "-")
741+
if key != "_":
742+
if key[0] == "_":
743+
key = key[1:]
744+
key = key.replace("_", "-")
744745
if isinstance(value, bool) and key != "value":
745746
if value is True:
746747
attlist.append(f"{conditional_escape(key)}")

0 commit comments

Comments
 (0)