Skip to content

fix: tagname kwarg sets element name without HTML attribute - #230

Open
ltsyk wants to merge 1 commit into
Knio:masterfrom
ltsyk:fix/tagname-kwarg-not-attribute
Open

ltsyk wants to merge 1 commit into
Knio:masterfrom
ltsyk:fix/tagname-kwarg-not-attribute

Conversation

@ltsyk

@ltsyk ltsyk commented Jul 30, 2026

Copy link
Copy Markdown

Summary

div(tagname="span") rendered as <span tagname="span">…</span> — the intended element rename was also written as an HTML attribute.

Change

Interpret the tagname keyword as the element name only; do not emit it as an attribute.

Test plan

  • div(tagname="span", id="x").render() → <span id="x"></span>
  • Unit test added

Fixes #215

tagname kwarg no longer emitted as attribute (issue Knio#215)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setting tagname as a keyword arg comes through in the html

1 participant