Skip to content

Commit 78623a0

Browse files
committed
make pub
1 parent 2f95d58 commit 78623a0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/idom/core/vdom.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def vdom(
206206
model["children"] = children
207207

208208
if key is not None:
209-
model["key"] = str(key)
209+
model["key"] = key
210210

211211
if event_handlers:
212212
model["eventHandlers"] = event_handlers

src/idom/utils.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def _vdom_attr_to_html_str(key: str, value: Any) -> tuple[str, str]:
282282
# camel to aria-* attributes
283283
or key.startswith("aria")
284284
# handle special cases
285-
or key in _DASHED_HTML_ATTRS
285+
or key in DASHED_HTML_ATTRS
286286
):
287287
key = _CAMEL_CASE_SUB_PATTERN.sub("-", key)
288288

@@ -295,9 +295,9 @@ def _vdom_attr_to_html_str(key: str, value: Any) -> tuple[str, str]:
295295
return key.lower(), str(value)
296296

297297

298-
# Pattern for delimitting camelCase names (e.g. camelCase to camel-case)
299-
_CAMEL_CASE_SUB_PATTERN = re.compile(r"(?<!^)(?=[A-Z])")
300-
301298
# see list of HTML attributes with dashes in them:
302299
# https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes#attribute_list
303-
_DASHED_HTML_ATTRS = {"acceptCharset", "httpEquiv"}
300+
DASHED_HTML_ATTRS = {"acceptCharset", "httpEquiv"}
301+
302+
# Pattern for delimitting camelCase names (e.g. camelCase to camel-case)
303+
_CAMEL_CASE_SUB_PATTERN = re.compile(r"(?<!^)(?=[A-Z])")

0 commit comments

Comments
 (0)