Skip to content

Allow multiple substitutions in attribute values

Choose a tag to compare

@davepeck davepeck released this 03 Oct 19:52
· 29 commits to main since this release

Previously, we only supported single substitutions in attribute values. Now we allow multiple, so this works:

first = "Alice"
last = "Smith"
button = html(t"<button data-name='{first} {last}'>Click me</button>")
# <button data-name="Alice Smith">Click me</button>

Thanks to @koxudaxi for the PR!