Skip to content

Allow users to paste expressions with ^ (power) or % (modulo)#682

Merged
EriWong merged 1 commit intomicrosoft:masterfrom
rudyhuyn:Fix299
Oct 18, 2019
Merged

Allow users to paste expressions with ^ (power) or % (modulo)#682
EriWong merged 1 commit intomicrosoft:masterfrom
rudyhuyn:Fix299

Conversation

@rudyhuyn
Copy link
Copy Markdown
Collaborator

@rudyhuyn rudyhuyn commented Sep 26, 2019

Fixes #299 and #674

Add support of % for Scientific and Programmer mode
Add support of ^ for Scientific mode

Description of the changes:

  • Modify StandardCalculatorViewModel::MapCharacterToButtonId to support the 2 new characters
  • Improve character verification and use 4 different white lists instead of one. (basic (for unit converters, standard, scientific and programmer)
    • this will also make our verification more robust
  • slight optimization of CopyPasteManager::ExtractOperands
  • Add unit tests

How changes were validated:

Manually

Copy link
Copy Markdown
Contributor

@EriWong EriWong left a comment

Choose a reason for hiding this comment

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

The change looks good. I think you'll need to resubmit after resolving the merge conflicts though.

@ghost ghost removed the needs author feedback label Oct 16, 2019
Copy link
Copy Markdown
Contributor

@EriWong EriWong left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for doing this!

@EriWong EriWong merged commit b97046a into microsoft:master Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support caret when pasting math formula strings. Pasting "2*2" works but pasting "2^32" fails.

4 participants