Skip to content

Commit

Permalink
ui
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsca committed May 29, 2024
1 parent d43ed50 commit d0ed552
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/jinjax/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ def irender(
attrs = kw.pop("__attrs", None) or {}
file_ext = kw.pop("__file_ext", "")
source = kw.pop("__source", "")

prefix, name = self._split_name(__name)
url_prefix = self._get_url_prefix(prefix)
self.jinja_env.loader = self.prefixes[prefix]
Expand Down Expand Up @@ -235,7 +234,6 @@ def irender(
attrs = attrs.as_dict if isinstance(attrs, HTMLAttrs) else attrs
attrs.update(kw)
kw = attrs

props, extra = component.filter_args(kw)
try:
props[PROP_ATTRS] = HTMLAttrs(extra)
Expand Down
3 changes: 3 additions & 0 deletions src/jinjax/html_attrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ def __getitem__(self, name: str) -> Any:
def __delitem__(self, name: str) -> None:
self._remove(name)

def __str__(self) -> str:
return str(self.as_dict)

def set(self, **kw) -> None:
"""
Sets an attribute or property:
Expand Down
4 changes: 2 additions & 2 deletions src/jinjax/jinjax.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
(?P<name>[a-zA-Z@:$_][a-zA-Z@:$_0-9-]*)
(?:
\s*=\s*
(?P<value>".*?"|'.*?'|\{.*?\})
(?P<value>".*?"|'.*?'|\{\s*.*?\s*\})
)?
(?:\s+|/|$)
(?:\s+|/|"|$)
"""
RX_ATTR = re.compile(re_attr, re.VERBOSE | re.DOTALL)

Expand Down

0 comments on commit d0ed552

Please sign in to comment.