Skip to content

Commit

Permalink
fix: drowned fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Lalisse committed Nov 7, 2022
1 parent 6f5a337 commit 996f7df
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/ryzom/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,8 @@ def __getattr__(self, name):
def __init__(self, *content, **attrs):
cls = type(self)
self.content = list(content) or []
if 'content' in attrs:
self.content += attrs['content']

for key in [*attrs.keys()]:
value = attrs[key]
Expand Down Expand Up @@ -444,7 +446,7 @@ def to_html(self, *content, attrs=None, **context):
html = f'<{self.tag} {attrs}>'
else:
html = f'<{self.tag} {attrs}>'
content = content or self.content
content = list(content) or self.content
html += self.content_html(*content, **context)
if render_js_str := self.render_js():
html += '\n'.join([
Expand Down
2 changes: 1 addition & 1 deletion src/ryzom_codec/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def get_token(self):
@staticmethod
def safe_attr_name(name):
if name == "class":
return "xclass"
return "cls"
if name == "for":
return "xfor"
return name.replace('-', '_').replace(':', 'COLON')
Expand Down

0 comments on commit 996f7df

Please sign in to comment.