File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -97,8 +97,11 @@ require('mathjax-full/' + (argv.dist ? 'es5' : 'components/src/mml-svg') + '/mml
9797MathJax . startup . promise . then ( ( ) => {
9898 const adaptor = MathJax . startup . adaptor ;
9999 const html = MathJax . startup . document ;
100- MathJax . startup . promise . then ( ( ) => {
101- console . log ( adaptor . doctype ( html . document ) ) ;
102- console . log ( adaptor . outerHTML ( adaptor . root ( html . document ) ) ) ;
103- } ) ;
100+ if ( html . math . toArray ( ) . length === 0 ) {
101+ adaptor . remove ( html . outputJax . svgStyles ) ;
102+ const cache = adaptor . elementById ( adaptor . body ( html . document ) , 'MJX-SVG-global-cache' ) ;
103+ if ( cache ) adaptor . remove ( cache ) ;
104+ }
105+ console . log ( adaptor . doctype ( html . document ) ) ;
106+ console . log ( adaptor . outerHTML ( adaptor . root ( html . document ) ) ) ;
104107} ) . catch ( err => console . log ( err ) ) ;
You can’t perform that action at this time.
0 commit comments