We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
e()
I created an estfiddle for the above code: http://ecomfe.github.io/est/fiddle/#code=LmxvZyhAbXNncykgewogICAgZWFjaChAbXNnczsgewogICAgICAgIGNvbnRlbnQ6IEB2YWx1ZTsKICAgIH0pOwp9CgpAbWVzc2FnZXM6ICdmb28nLCAnYmFyJzsKCnNwYW4gewogICAgLmxvZyhAbWVzc2FnZXMpOwp9CgpkaXYgewogICAgLmxvZygnZm9vJyk7Cn0K
The text was updated successfully, but these errors were encountered:
Don't escape quotes in an each less#3354
9c5d8f4
Fixes #3346 #3338 #3345 (#3363)
88e126b
* Don't escape quotes in an each #3354 * Fixes #3346 - ambiguous mixin call / color parsing * Fixes #3338 - better error message * Fixes #3338 - missed mix() function * Fixes #3345
Should be fixed now. -> https://github.com/less/less.js/blob/master/packages/test-data/less/_main/functions-each.less#L133
Sorry, something went wrong.
matthew-dean
No branches or pull requests
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:
The output is this:
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
The text was updated successfully, but these errors were encountered: