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

Distinguish negation from subtraction #60

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Distinguish negation from subtraction #60

wants to merge 3 commits into from

Conversation

drlippman
Copy link
Contributor

This change attempts to address issue #30 by adjusting the asciimath grammar to distinguish negation from subtraction.

This isn't perfect. For example -5 and -4 still treats the second negation as subtraction.

I'd encourage others to see if you can find a case this breaks on.

@drlippman drlippman changed the title Issue30 Distinguish negation from subtraction Aug 29, 2016
@drlippman
Copy link
Contributor Author

It's been about 8 months with no comments. @jipsen, it'd be great to get your input on whether the grammar change is reasonable, and if Peter, @adius, or someone else would you be willing to test this that'd be great. I hate to make big changes to something so many people use without input or validation from anyone else.

@drlippman
Copy link
Contributor Author

If MathJax moves to a AsciiMath-to-TeX-to-MathJax pipeline, this change may not be necessary, as the TeX processor already handles negation better, without needing any changes to how AsciiMath is converted to TeX.

@adius
Copy link
Contributor

adius commented Sep 12, 2017

Do you still want my feedback or is this obsolete? =P

@drlippman
Copy link
Contributor Author

@adius, I haven't heard anything about MathJax changing their process, and I haven't yet merged this into master, so would certainly still welcome feedback, even if that feedback is "this issue this is trying to address isn't a big deal, so let's not make the code more complicated."

Copy link
Contributor

@adius adius left a comment

Choose a reason for hiding this comment

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

I checked out the test file and the output looks good to me. The code looks fine, too. (Altough we should really start to use a code formatter - e.g. https://github.com/prettier/prettier. The code formatting is really hacky 😂)

@adius
Copy link
Contributor

adius commented Jan 30, 2018

Oh, and I think differentiating between negation and subtraction is important! ;-)

@drlippman
Copy link
Contributor Author

Thanks for looking at it, @adius. I'm still slightly scared to merge this, since it's very likely I missed an edge case, and MathJax's update cycle is pretty long. But like you said it's probably important so I'll try to finish this up and merge it.

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.

2 participants