Added length
function (#1542). Added scalar value handling for extract
and length
(#1576).
#1577
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I hope it's not too bad idea to merge two features in the single pull request since both functions are heavily related (should work in conjunction, handle arguments in the same way and share same tests)...
Notes:
extract
andlength
functions. #1576 for "scalar value handling".@var: a b c, 1 2 3
(see add a function to return the number of items in a list #1542) are interpreted as a "multidimensional" array/list - this is currentextract
behaviour andlength
just follows the same pattern (see included tests for details).~"@{var-1}, @{var-2}, @{var-3}, etc"
are treated as a scalar value (i.e. length = 1). This functionality is somewhat beyond both functions scope and needs some further discussion/decision anyway...~""
is interpreted as an array of length 1, "true empty value" (you can get it via...
arguments) works as a zero-length-array (see test/css/extract-and-length.css:38 and test/less/extract-and-length.less:39)