File tree 2 files changed +23
-1
lines changed
2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -532,7 +532,7 @@ function ConfigureMathJax() {
532
532
//
533
533
// Parse added extensions list and add to standard ones
534
534
//
535
- var extensionList = extensions . split ( / s * , \s * / ) ;
535
+ var extensionList = extensions . split ( / \ s* , \s * / ) ;
536
536
for ( var i = 0 ; i < extensionList . length ; i ++ ) {
537
537
var matches = extensionList [ i ] . match ( / ^ ( .* ?) ( \. j s ) ? $ / ) ;
538
538
window . MathJax . extensions . push ( matches [ 1 ] + '.js' ) ;
Original file line number Diff line number Diff line change
1
+ var tape = require ( 'tape' ) ;
2
+ var mjAPI = require ( '../lib/main.js' ) ;
3
+
4
+ tape ( 'Options "extension": multiple extensions' , function ( t ) {
5
+ t . plan ( 1 ) ;
6
+ mjAPI . config ( {
7
+ extensions : 'TeX/autoload-all.js, TeX/color.js'
8
+ } ) ;
9
+ mjAPI . typeset (
10
+ {
11
+ math : 'E = mc^2' ,
12
+ format : 'TeX' ,
13
+ mml : true
14
+ } ,
15
+ function ( data ) {
16
+ t . notOk (
17
+ data . errors ,
18
+ 'Config block with multiple extensions throws no error'
19
+ ) ;
20
+ }
21
+ ) ;
22
+ } ) ;
You can’t perform that action at this time.
0 commit comments