diff --git a/src/core.js b/src/core.js index 6f0893fc3b6..42419221789 100644 --- a/src/core.js +++ b/src/core.js @@ -8,9 +8,6 @@ require('native-promise-only'); // inject plot css require('../build/plotcss'); -// inject default MathJax config -require('./fonts/mathjax_config')(); - // include registry module and expose register method var Registry = require('./registry'); var register = exports.register = Registry.register; diff --git a/src/fonts/mathjax_config.js b/src/fonts/mathjax_config.js deleted file mode 100644 index 71b5d9bde16..00000000000 --- a/src/fonts/mathjax_config.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -/* global MathJax:false */ - -module.exports = function() { - if(typeof MathJax !== 'undefined') { - var globalConfig = (window.PlotlyConfig || {}).MathJaxConfig !== 'local'; - - if(globalConfig) { - MathJax.Hub.Config({ - messageStyle: 'none', - skipStartupTypeset: true, - displayAlign: 'left', - tex2jax: { - inlineMath: [['$', '$'], ['\\(', '\\)']] - } - }); - MathJax.Hub.Configured(); - } - } -}; diff --git a/test/jasmine/bundle_tests/mathjax_test.js b/test/jasmine/bundle_tests/mathjax_test.js index 8d0014d985d..706e1e61911 100644 --- a/test/jasmine/bundle_tests/mathjax_test.js +++ b/test/jasmine/bundle_tests/mathjax_test.js @@ -11,14 +11,14 @@ describe('Test MathJax:', function() { // N.B. we have to load MathJax "dynamically" as Karam // does not undefined the MathJax's `?config=` parameter. // - // Eventually, it might be nice to move these tests in the "regular" test + // Now with the mathjax_config no longer needed, + // it might be nice to move these tests in the "regular" test // suites, but to do that we'll need to find a way to remove MathJax from // page without breaking things downstream. beforeAll(function(done) { mathJaxScriptTag = document.createElement('script'); mathJaxScriptTag.type = 'text/javascript'; mathJaxScriptTag.onload = function() { - require('@src/fonts/mathjax_config')(); done(); }; mathJaxScriptTag.onerror = function() {