math_keyboard
math_keyboard copied to clipboard
Unnecessary parentheses added by `convertMathExpressionToTeXNode`
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:
- 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
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.
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.