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();
18
18
require ( '../build/plotcss' ) ;
19
19
20
20
// inject default MathJax config
21
- require ( './fonts/mathjax_config' ) ;
21
+ require ( './fonts/mathjax_config' ) ( ) ;
22
22
23
23
// include registry module and expose register method
24
24
var Registry = require ( './registry' ) ;
Original file line number Diff line number Diff line change 10
10
11
11
/* global MathJax:false */
12
12
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' ;
20
16
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
+ }
31
28
}
32
-
33
- } else {
34
- exports . MathJax = false ;
35
- }
29
+ } ;
You can’t perform that action at this time.
0 commit comments