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

fix(autofraction): only remove outer parentheses when they are matching #220

Merged
merged 3 commits into from
Nov 1, 2023

Conversation

duanwilliam
Copy link
Contributor

resolves #206

output

previously, `(a)(b)/` would be erroneously transformed into `\frac{a)(b}{}`,
as algorithm would just check if first and last were open and closed parens.
now, only removes outer parentheses if they are matched.

fixes artisticat1#206
match coding style to that of surrounding code, reducing nesting
@artisticat1
Copy link
Owner

Looks like the findMatchingBracket check was removed, so in its current state the PR doesn't actually resolve #206?

commit 525aaa9 cleaned up code style but removed the actual fix added.
this restores said fix.
@duanwilliam
Copy link
Contributor Author

oops, didn't look too closely or test it. should be fixed now

@artisticat1 artisticat1 merged commit 1478fce into artisticat1:main Nov 1, 2023
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.

[BUG] Auto-fraction strips parentheses from product of parenthesized terms
2 participants