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

Unnecessary parentheses added by convertMathExpressionToTeXNode #27

Open
taojoe opened this issue Jan 7, 2022 · 2 comments
Open

Unnecessary parentheses added by convertMathExpressionToTeXNode #27

taojoe opened this issue Jan 7, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@taojoe
Copy link

taojoe commented Jan 7, 2022

Bug description

when I need to set '{a}+{b}' to MathFieldEditingController, the convertMathExpressionToTeXNode add '()' to the expression, which it shouldn't.

To Reproduce

Steps to reproduce the behavior:

  1. run the following code with debug , then you will see the node has 5 leaves, the start and the end leaf are '(', ')'
final node=convertMathExpressionToTeXNode(Parser().parse('{a}+{b}'));

Expected behavior

simple expression should not wrap with '()', '()' is only required when a lower priority expression as part of higher priority expression, like plus/minus expression as part of times expression

Screenshots

none

@taojoe taojoe added the bug Something isn't working label Jan 7, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2022

Hi 👋🏽 Thank you for opening your first issue with simpleclub/math_keyboard ❤

You can expect triage from us soon 🙂
In the meantime, you can try to search for similar issues in our issue database.

@creativecreatorormaybenot creativecreatorormaybenot changed the title convertMathExpressionToTeXNode add brace when express is BinaryOperator Unnecessary parentheses added by convertMathExpressionToTeXNode Jan 11, 2022
@creativecreatorormaybenot creativecreatorormaybenot added enhancement New feature or request and removed bug Something isn't working labels Jan 11, 2022
@creativecreatorormaybenot
Copy link
Contributor

Hi @taojoe, thanks for reporting. This is indeed something that we also noticed. This would require to enhance the way we update the math controller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants