Skip to content

Fixes #2824 - Expressions require a delimiter of some kind in mixin args - #3258

Merged
matthew-dean merged 2 commits into
less:masterfrom
matthew-dean:bugfix-2824
Jul 11, 2018
Merged

matthew-dean merged 2 commits into
less:masterfrom
matthew-dean:bugfix-2824

Conversation

@matthew-dean

@matthew-dean matthew-dean commented Jul 4, 2018 •

Copy link
Copy Markdown
Member

Fixes #2824

@matthew-dean matthew-dean changed the title Expressions require a delimiter of some kind in mixin args Fixes #2824 - Expressions require a delimiter of some kind in mixin args Jul 4, 2018

@calvinjuarez calvinjuarez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread lib/less/parser/parser.js
}

if (!arg) {
if (!arg || !hasSep) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this ever evaluate to true? It looks like hasSep isn't touched between hasSep = true and !hasSep. Unless there's some kind of non-linear code happening that would set it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's set per loop. The first time it's true; that's intentional because it doesn't need a separator. Then it continues to be set by the presence of a separator, but depends on what type during the loop. So if ever it finishes without detecting a true separation of args, it should fail... I think. It seems to work? lol

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good enough for me.

@matthew-dean matthew-dean reopened this Jul 8, 2018
@matthew-dean
matthew-dean merged commit d99a1b8 into less:master Jul 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants