We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9b509a4 commit e83655dCopy full SHA for e83655d
1 file changed
speech/mml2svg-page
@@ -97,8 +97,11 @@ require('mathjax-full/' + (argv.dist ? 'es5' : 'components/src/mml-svg') + '/mml
97
MathJax.startup.promise.then(() => {
98
const adaptor = MathJax.startup.adaptor;
99
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
- });
+ if (html.math.toArray().length === 0) {
+ adaptor.remove(html.outputJax.svgStyles);
+ const cache = adaptor.elementById(adaptor.body(html.document), 'MJX-SVG-global-cache');
+ if (cache) adaptor.remove(cache);
104
+ }
105
+ console.log(adaptor.doctype(html.document));
106
+ console.log(adaptor.outerHTML(adaptor.root(html.document)));
107
}).catch(err => console.log(err));
0 commit comments