Non-boolean {% attrs %} which appear after boolean attributes don't get parsed/rendered correctly
ocratravis opened this issue · comments
This is with slippers 0.4.0.
Consider the following simple component, named test_component
:
<input type="text" {% attrs required maxlength %}>
If you use it in a template like this:
{% test_component required maxlength=10 %}
...then it outputs this (note that the maxlength
attribute is missing):
<input type="text" required>
But if you reverse the order of the attributes in the template:
{% test_component maxlength=10 required %}
Or if you pass an explicit value:
{% test_component required=True maxlength=10 %}
...then it works as expected:
<input type="text" required maxlength="10">
This has been fixed by #24
I've released version 0.5.0a0
which addresses this issue. Could you please give it a try?
pip install slippers==0.5.0a0