mozilla / nunjucks

A powerful templating engine with inheritance, asynchronous control, and more (jinja2 inspired)
https://mozilla.github.io/nunjucks/
BSD 2-Clause "Simplified" License
8.48k stars 635 forks source link

Group of css classes not rendered as expected #1413

Open bsastregx opened 1 year ago

bsastregx commented 1 year ago

Hi!

I am setting a group of two css classes like this :

{% set listClasses = "main-menu__links--cl unstyled" %}

Then, I add this classes to a ul :

<ul class={{listClasses}} >

Expected result on the browser:

<ul class="main-menu__links--cl unstyled">

Obtained result:

<ul class="main-menu__links--cl" unstyled="">

As you can see, "unstyled" is being printed outside of the class attribute. More than that, is being printed as a new attirbute.

image