Skip to content

Commit

Permalink
Merge pull request #693 from mathjax/issue2678
Browse files Browse the repository at this point in the history
Clear the stylesheet when used in a new MathDocument.  (mathjax/MathJax#2678)
  • Loading branch information
dpvc authored May 24, 2021
2 parents eb9c51f + cf268ad commit e5844ea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions ts/output/chtml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@ CommonOutputJax<N, T, D, CHTMLWrapper<N, T, D>, CHTMLWrapperFactory<N, T, D>, CH
this.font.adaptiveCSS(this.options.adaptiveCSS);
}

/**
* @override
*/
public initialize() {
this.chtmlStyles = null;
}

/**
* @override
*/
Expand Down
3 changes: 2 additions & 1 deletion ts/output/svg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,9 @@ CommonOutputJax<N, T, D, SVGWrapper<N, T, D>, SVGWrapperFactory<N, T, D>, SVGFon
*/
public initialize() {
if (this.options.fontCache === 'global') {
this.fontCache.clearCache();
this.clearFontCache();
}
this.svgStyles = null;
}

/**
Expand Down

0 comments on commit e5844ea

Please sign in to comment.