Skip to content
New issue

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

Require brackets to do maths #1151

Merged
merged 16 commits into from Feb 2, 2013
Merged

Require brackets to do maths #1151

merged 16 commits into from Feb 2, 2013

Conversation

lukeapage
Copy link
Member

See #915

This continues that work, taking it further, so that brackets are required for all operations to occur (not just '/')

If you have brackets and an operation, e.g. 1 + (1 * 1) then it is output literal. To operate on the 1*1 use double brackets. The rule can be summed up as - add un-needed brackets to make it treat the content as maths.

things to do:

  1. I reverted the unit outputting. I want to add a "strictUnits" mode that is on by default and throws an exception if the unit to output doens't make sense. When the option is off it will behave as it does in this pull request
  2. add a strictMaths option that is on by default - so that this is a breaking change but people have a way back in the short term.

Please look carefully at the unit tests, and let me know what you think.

@lukeapage
Copy link
Member Author

@MatthewDL sounds good.

also fix..
3. comments test has stopped passing
4. evalEnv - add to remove
5. tests with variables in media

@lukeapage lukeapage merged commit a490bc1 into less:master Feb 2, 2013
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.

None yet

2 participants