Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update to use @plotly/mathjax-v(2|3) instead of just mathjax-v(2|3) #7394

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

Merged
merged 4 commits into from
Mar 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion devtools/test_dashboard/index-mathjax3.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h4>no MathJax: Apple: $2, Orange: $3</h4>
}
};
</script>
<script src="../../node_modules/mathjax-v3/es5/tex-svg.js"></script>
<script src="../../node_modules/@plotly/mathjax-v3/es5/tex-svg.js"></script>
<script charset="utf-8" id="source" src="../../build/plotly.js" type="module"></script>
<script charset="utf-8" src="../../build/test_dashboard-bundle.js"></script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion devtools/test_dashboard/index-mathjax3chtml.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
}
};
</script>
<script src="../../node_modules/mathjax-v3/es5/tex-chtml.js"></script>
<script src="../../node_modules/@plotly/mathjax-v3/es5/tex-chtml.js"></script>

<script charset="utf-8" id="source" src="../../build/plotly.js" type="module"></script>
<script charset="utf-8" src="../../build/test_dashboard-bundle.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion devtools/test_dashboard/index-strict.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</div>
<div id="snapshot"></div>

<script src="../../node_modules/mathjax-v2/MathJax.js?config=TeX-AMS-MML_SVG"></script>
<script src="../../node_modules/@plotly/mathjax-v2/MathJax.js?config=TeX-AMS-MML_SVG"></script>
<script charset="utf-8" id="source" src="../../build/plotly.js"></script>
<script charset="utf-8" src="../../build/test_dashboard-bundle.js"></script>
</body>
Expand Down
2 changes: 1 addition & 1 deletion devtools/test_dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</div>
<div id="snapshot"></div>

<script src="../../node_modules/mathjax-v2/MathJax.js?config=TeX-AMS-MML_SVG"></script>
<script src="../../node_modules/@plotly/mathjax-v2/MathJax.js?config=TeX-AMS-MML_SVG"></script>
<script charset="utf-8" id="source" src="../../build/plotly.js"></script>
<script charset="utf-8" src="../../build/test_dashboard-bundle.js"></script>
</body>
Expand Down
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@
"karma-viewport": "1.0.2",
"lodash": "^4.17.21",
"madge": "^8.0.0",
"mathjax-v2": "npm:[email protected]",
"mathjax-v3": "npm:mathjax@^3.2.2",
"@plotly/mathjax-v2": "npm:[email protected]",
"@plotly/mathjax-v3": "npm:mathjax@^3.2.2",
"minify-stream": "^2.1.0",
"npm-link-check": "^5.0.1",
"open": "^8.4.2",
Expand Down
2 changes: 1 addition & 1 deletion tasks/noci_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ test_image () {
$root/../orca/bin/orca.js graph \
$root/test/image/mocks/mapbox_osm-style.json \
$root/test/image/mocks/mapbox_density0-legend.json \
--mathjax $root/node_modules/mathjax-v2/MathJax.js \
--mathjax $root/node_modules/@plotly/mathjax-v2/MathJax.js \
--plotly $root/build/plotly.js \
--mapbox-access-token "pk.eyJ1IjoicGxvdGx5LWRvY3MiLCJhIjoiY2xpMGYyNWgxMGJhdzNzbXhtNGI0Nnk0aSJ9.0oBvi_UUZ0O1N0xk0yfRwg" \
--output-dir $root/test/image/baselines/ \
Expand Down
4 changes: 2 additions & 2 deletions test/jasmine/bundle_tests/mathjax_config_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ describe('Test MathJax v' + mathjaxVersion + ' config test:', function() {
}

var src = mathjaxVersion === 3 ?
'/base/node_modules/mathjax-v3/es5/tex-svg.js' :
'/base/node_modules/mathjax-v2/MathJax.js?config=TeX-AMS_SVG';
'/base/node_modules/@plotly/mathjax-v3/es5/tex-svg.js' :
'/base/node_modules/@plotly/mathjax-v2/MathJax.js?config=TeX-AMS_SVG';

loadScript(src, done);
});
Expand Down
4 changes: 2 additions & 2 deletions test/jasmine/bundle_tests/mathjax_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ var mathjaxVersion = __karma__.config.mathjaxVersion;
describe('Test MathJax v' + mathjaxVersion + ':', function() {
beforeAll(function(done) {
var src = mathjaxVersion === 3 ?
'/base/node_modules/mathjax-v3/es5/tex-svg.js' :
'/base/node_modules/mathjax-v2/MathJax.js?config=TeX-AMS-MML_SVG';
'/base/node_modules/@plotly/mathjax-v3/es5/tex-svg.js' :
'/base/node_modules/@plotly/mathjax-v2/MathJax.js?config=TeX-AMS-MML_SVG';

// N.B. we have to load MathJax "dynamically" as Karma
// does not undefined the MathJax's `?config=` parameter.
Expand Down
4 changes: 2 additions & 2 deletions test/jasmine/karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ if(isFullSuite) {

var pathToCustomMatchers = path.join(__dirname, 'assets', 'custom_matchers.js');
var pathToSaneTopojsonDist = path.join(__dirname, '..', '..', 'node_modules', 'sane-topojson', 'dist');
var pathToMathJax2 = path.join(__dirname, '..', '..', 'node_modules', 'mathjax-v2');
var pathToMathJax3 = path.join(__dirname, '..', '..', 'node_modules', 'mathjax-v3');
var pathToMathJax2 = path.join(__dirname, '..', '..', 'node_modules', '@plotly/mathjax-v2');
var pathToMathJax3 = path.join(__dirname, '..', '..', 'node_modules', '@plotly/mathjax-v3');
var pathToVirtualWebgl = path.join(__dirname, '..', '..', 'node_modules', 'virtual-webgl', 'src', 'virtual-webgl.js');

var reporters = [];
Expand Down