-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Use json extension on mathmaps files #2403
Comments
This is related to [SRE] (https://github.com/zorkow/speech-rule-engine) and mentioned in SRE issue 329. The reason for the I see that at least for cdnjs this has now been resolved and I am actually keen to go back to |
Awesome, thanks for you blazing fast response ⚡ |
@zorkow Any news on this? Do you need help to check if json files are supported by cdns? Do you have the complete list of cdns used by SRE? |
Any news on this bug? It seems to have been fixed by speech-rule-engine a while ago: Speech-Rule-Engine/speech-rule-engine#536 |
This is already in the latest SRE 4.0 beta release. I am hoping to get the 4.0 out before Christmas. |
This is also a problem for webpack 5's minifier, Terser, which throws an error when it tries to parse these files as JavaScript. |
Linking: mathjax/MathJax-src#745 which the pull request that integrates SRE 4.0 in MathJax. |
Is your feature request related to a problem? Please describe.
Currently, the files in the
mathmaps
directory are using the.js
extension but they are really.json
files. For instance:sre/mathmaps/es.js
Per say it's not really an issue but some linter/parser (more specifically the Firefox Add-ons linter: https://github.com/mozilla/addons-linter) will parse these "JavaScript" files and fail:
In other words, if you are embedding MathJax 3.0.5 in a Firefox Add-on, you cannot publish your extension anymore.
The linter was not complaining with MathJax 3.0.1 because the structure and the files content changed.
In MathJax 3.0.1, each files contain a single Array on a single line:
sre/mathmaps/es/functions/algebra.js
Describe the solution you'd like
I think the files should use the
.json
file extension instead of.js
.Describe alternatives you've considered
I guess we could also keep the
.js
file extension but declare a variable so linter and JS parser won't fail:sre/mathmaps/es.js
The text was updated successfully, but these errors were encountered: