File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -537,12 +537,13 @@ function GetMML(result) {
537537 }
538538 }
539539 try {
540- result . mml = jax . root . toMathML ( '' , jax ) ;
541- if ( data . mmlNode ) result . mmlNode = jsdom ( result . mml ) . body . firstChild ;
540+ var mml = jax . root . toMathML ( '' , jax ) ;
542541 } catch ( err ) {
543542 if ( ! err . restart ) { throw err ; } // an actual error
544543 return MathJax . Callback . After ( window . Array ( GetMML , result ) , err . restart ) ;
545544 }
545+ if ( data . mml ) result . mml = mml ;
546+ if ( data . mmlNode ) result . mmlNode = jsdom ( mml ) . body . firstChild ;
546547}
547548
548549//
Original file line number Diff line number Diff line change 11var tape = require ( 'tape' ) ;
22var mjAPI = require ( "../lib/main.js" ) ;
33
4- tape ( 'mmlNode should enable mml' , function ( t ) {
4+ tape ( 'mmlNode should not produce mml' , function ( t ) {
55 t . plan ( 1 ) ;
66 mjAPI . start ( ) ;
77 var tex = 'x' ;
@@ -11,6 +11,6 @@ tape('mmlNode should enable mml', function(t) {
1111 format : "TeX" ,
1212 mmlNode : true
1313 } , function ( data ) {
14- t . ok ( data . mml , 'MathML generated' ) ;
14+ t . ok ( data . mml === undefined , 'mml not generated' ) ;
1515 } ) ;
1616} ) ;
You can’t perform that action at this time.
0 commit comments