Skip to content

Removes "double paren" issue for boolean / if function - #3259

Merged
matthew-dean merged 5 commits into
less:masterfrom
matthew-dean:bugfix-boolean-if
Jul 10, 2018
Merged

matthew-dean merged 5 commits into
less:masterfrom
matthew-dean:bugfix-boolean-if

Conversation

@matthew-dean

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

Copy link
Copy Markdown
Member

See tests, allows more intuitive form for simple conditions:

  @f: boolean(3 = 4);
  f: if(not(@f), 6);
  g: if(true, 3, 5);
  h: if(false, 3, 5);

Note: multiple conditions still require parens around conditions without refactoring e.g.

if ((true) and (true), 3, 5);

EDIT: this is now fixed. You can write:

if (true and true, 3, 5);

@matthew-dean matthew-dean reopened this Jul 8, 2018
@matthew-dean

Copy link
Copy Markdown
Member Author

This is low risk and pointed out at the time of implementation as a flaw, so I'll just merge.

@matthew-dean
matthew-dean merged commit 85e64ce into less:master Jul 10, 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.

1 participant