We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 356054c commit 7dc49c8Copy full SHA for 7dc49c8
htmlgenerator/htmltags.py
@@ -738,9 +738,10 @@ def flatattrs(attributes: dict, context: dict) -> str:
738
if value is None:
739
continue
740
741
- if key[0] == "_":
742
- key = key[1:]
743
- key = key.replace("_", "-")
+ if key != "_":
+ if key[0] == "_":
+ key = key[1:]
744
+ key = key.replace("_", "-")
745
if isinstance(value, bool) and key != "value":
746
if value is True:
747
attlist.append(f"{conditional_escape(key)}")
0 commit comments