Crown-Commercial-Service / govuk-frontend-jinja

Tools to use the GOV.UK Design System with Python webapps that use Jinja2 and Flask 🐍
MIT License
9 stars 6 forks source link

Nunjucks strict equality test `===` is not handled correctly #49

Closed lfdebrux closed 4 years ago

lfdebrux commented 4 years ago

govuk-frontend 3.8.0 includes use of the JavaScript strict equality operator ===, see https://github.com/alphagov/govuk-frontend/commit/9a8b9f0b4c4c77ae3b8bba7762041dffb9d64eba

This confuses the Jinja parser and causes the syntax error jinja2.exceptions.TemplateSyntaxError: unexpected '='.

lfdebrux commented 4 years ago

Interesting Nunjucks doesn't have Jinja tests, instead relying on pure JavaScript conditionals.