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

Using 'const' keyword with certain global variables causes mathjax to throw exceptions on render #1806

Closed
applmak opened this issue Jul 12, 2017 · 4 comments
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Available v2.7

Comments

@applmak
Copy link

applmak commented Jul 12, 2017

Here's a simple repro case:

<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_CHTML"></script>
<script>
const scale = 1.0;
</script>
\(x = 1\)

I would expect this to render x = 1, but instead, I see [Math Processing Error].

@dpvc
Copy link
Member

dpvc commented Jul 12, 2017

Thanks! Looks like a non-localized variable used in a function. Argh! I thought we had tested for that, but apparently not. I'll fix the reference, and look into why this was missed...

@dpvc dpvc added the Accepted Issue has been reproduced by MathJax team label Jul 12, 2017
@dpvc dpvc added this to the MathJax v2.7.2 milestone Jul 12, 2017
@dpvc
Copy link
Member

dpvc commented Jul 14, 2017

The issue1806 branch includes the fix for this. I found one other variable that was also global that should not have been. The compressor usually reports these, but for these cases it doesn't. Not sure why.

dpvc added a commit to mathjax/MathJax-test that referenced this issue Jul 14, 2017
@dpvc
Copy link
Member

dpvc commented Jul 14, 2017

==> In testsuite

UI/issue1806.html

@dpvc dpvc closed this as completed Jul 14, 2017
dpvc added a commit that referenced this issue Jul 21, 2017
Localize some variables that where accidentally global.  #1806
@dpvc
Copy link
Member

dpvc commented Jul 21, 2017

==> Merged

@dpvc dpvc added Merged Merged into develop branch and removed Ready for Review labels Jul 21, 2017
@dpvc dpvc added Fixed v2.7 and removed Merged Merged into develop branch labels Jul 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Issue has been reproduced by MathJax team Fixed Test Available v2.7
Projects
None yet
Development

No branches or pull requests

2 participants