algebra-latex icon indicating copy to clipboard operation
algebra-latex copied to clipboard

Brackets are lost when parsing and formatting some expressions

Open timmckague opened this issue 2 years ago • 0 comments

First of all, thank you creating and open sourcing this library. Not sure if you're still maintaining/using this library but just in case...

I've noticed some issues when I try to parse some expressions with brackets. For example if I feed in the latex 5 - ( 3 + 1 ) and then convert the result to math, I get 5-3+1 instead of 5-(3+1) I would expect.

At first I thought this might be related to an issue in the formatter, but digging a little further into the problem I see that the expressions 5 - 3 + 1 and 5 - (3 + 1) unexpectedly produce the same AST.

timmckague avatar Apr 10 '22 16:04 timmckague