Skip to content

Commit e5844ea

Browse files
authored
Merge pull request #693 from mathjax/issue2678
Clear the stylesheet when used in a new MathDocument. (mathjax/MathJax#2678)
2 parents eb9c51f + cf268ad commit e5844ea

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

ts/output/chtml.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,13 @@ CommonOutputJax<N, T, D, CHTMLWrapper<N, T, D>, CHTMLWrapperFactory<N, T, D>, CH
140140
this.font.adaptiveCSS(this.options.adaptiveCSS);
141141
}
142142

143+
/**
144+
* @override
145+
*/
146+
public initialize() {
147+
this.chtmlStyles = null;
148+
}
149+
143150
/**
144151
* @override
145152
*/

ts/output/svg.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,9 @@ CommonOutputJax<N, T, D, SVGWrapper<N, T, D>, SVGWrapperFactory<N, T, D>, SVGFon
135135
*/
136136
public initialize() {
137137
if (this.options.fontCache === 'global') {
138-
this.fontCache.clearCache();
138+
this.clearFontCache();
139139
}
140+
this.svgStyles = null;
140141
}
141142

142143
/**

0 commit comments

Comments
 (0)