File tree Expand file tree Collapse file tree 2 files changed +16
-22
lines changed
Expand file tree Collapse file tree 2 files changed +16
-22
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ require('es6-promise').polyfill();
1818require ( '../build/plotcss' ) ;
1919
2020// inject default MathJax config
21- require ( './fonts/mathjax_config' ) ;
21+ require ( './fonts/mathjax_config' ) ( ) ;
2222
2323// include registry module and expose register method
2424var Registry = require ( './registry' ) ;
Original file line number Diff line number Diff line change 1010
1111/* global MathJax:false */
1212
13- /**
14- * Check and configure MathJax
15- */
16- if ( typeof MathJax !== 'undefined' ) {
17- exports . MathJax = true ;
18-
19- var globalConfig = ( window . PlotlyConfig || { } ) . MathJaxConfig !== 'local' ;
13+ module . exports = function ( ) {
14+ if ( typeof MathJax !== 'undefined' ) {
15+ var globalConfig = ( window . PlotlyConfig || { } ) . MathJaxConfig !== 'local' ;
2016
21- if ( globalConfig ) {
22- MathJax . Hub . Config ( {
23- messageStyle : 'none' ,
24- skipStartupTypeset : true ,
25- displayAlign : 'left' ,
26- tex2jax : {
27- inlineMath : [ [ '$' , '$' ] , [ '\\(' , '\\)' ] ]
28- }
29- } ) ;
30- MathJax . Hub . Configured ( ) ;
17+ if ( globalConfig ) {
18+ MathJax . Hub . Config ( {
19+ messageStyle : 'none' ,
20+ skipStartupTypeset : true ,
21+ displayAlign : 'left' ,
22+ tex2jax : {
23+ inlineMath : [ [ '$' , '$' ] , [ '\\(' , '\\)' ] ]
24+ }
25+ } ) ;
26+ MathJax . Hub . Configured ( ) ;
27+ }
3128 }
32-
33- } else {
34- exports . MathJax = false ;
35- }
29+ } ;
You can’t perform that action at this time.
0 commit comments