@@ -457,11 +457,11 @@ export abstract class Startup {
457457 ) {
458458 const name = iname + '2' + oname ;
459459 MathJax [ name ] = ( math : string , options : OptionList = { } ) => {
460- options . format = input . name ;
460+ options = { ... options , format : input . name } ;
461461 return Startup . document . convert ( math , options ) ;
462462 } ;
463463 MathJax [ name + 'Promise' ] = ( math : string , options : OptionList = { } ) => {
464- options . format = input . name ;
464+ options = { ... options , format : input . name } ;
465465 return Startup . document . convertPromise ( math , options ) ;
466466 } ;
467467 MathJax [ oname + 'Stylesheet' ] = ( ) =>
@@ -487,16 +487,14 @@ export abstract class Startup {
487487 public static makeMmlMethods ( name : string , input : INPUTJAX ) {
488488 const STATE = MathJax . _ . core . MathItem . STATE ;
489489 MathJax [ name + '2mml' ] = ( math : string , options : OptionList = { } ) => {
490- options . end = STATE . CONVERT ;
491- options . format = input . name ;
490+ options = { ...options , end : STATE . CONVERT , format : input . name } ;
492491 return Startup . toMML ( Startup . document . convert ( math , options ) ) ;
493492 } ;
494493 MathJax [ name + '2mmlPromise' ] = async (
495494 math : string ,
496495 options : OptionList = { }
497496 ) => {
498- options . end = STATE . CONVERT ;
499- options . format = input . name ;
497+ options = { ...options , end : STATE . CONVERT , format : input . name } ;
500498 const node = await Startup . document . convertPromise ( math , options ) ;
501499 return Startup . toMML ( node ) ;
502500 } ;
0 commit comments