EmilStenstrom / django-components

Create simple reusable template components in Django.
MIT License
953 stars 59 forks source link

feat: support special chars `# @ - . :` in component kwargs #477

Closed JuroOravec closed 1 week ago

JuroOravec commented 2 weeks ago

Part of https://github.com/EmilStenstrom/django-components/discussions/471

This MR allows us to use component argument keys with special characters # @ - . :.

The parsing logic override is based on django-slippers implementation

EmilStenstrom commented 1 week ago

We are taking on a big maintenance burden by copying in a modified version of django's parsing like this. If we would go with the attrs="""x""" solutions this wouldn't be needed... :)

But it's looking like we will need it, but the latest messages, so maybe we're fine.