-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed
Labels
Description
Short version: When a list of length 1 is passed and the list contains a string with quotes, the quotes are removed.
Long version: Consider this code:
.log(@msgs) {
each(@msgs; {
content: @value;
}
}
@messages: 'foo', 'bar';
span {
.log(@messages);
}
div {
.log('foo');
}
The output is this:
span {
content: 'foo';
content: 'bar';
}
div {
content: foo;
}
In the first example the quotes around the list items are preserved. In the second example, the quotes are removed.
I could get a consistent result by using the e()
function to always remove the quotes, but in some cases I might want to keep them.
I created an estfiddle for the above code: http://ecomfe.github.io/est/fiddle/#code=LmxvZyhAbXNncykgewogICAgZWFjaChAbXNnczsgewogICAgICAgIGNvbnRlbnQ6IEB2YWx1ZTsKICAgIH0pOwp9CgpAbWVzc2FnZXM6ICdmb28nLCAnYmFyJzsKCnNwYW4gewogICAgLmxvZyhAbWVzc2FnZXMpOwp9CgpkaXYgewogICAgLmxvZygnZm9vJyk7Cn0K