Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clear the stylesheet when used in a new MathDocument. (mathjax/MathJax#2678) #693

Merged
merged 1 commit into from
May 24, 2021

Conversation

dpvc
Copy link
Member

@dpvc dpvc commented Apr 27, 2021

This PR makes sure the output jax clear its internal stylesheet pointer when it is used in a new document.

Resolves issue mathjax/MathJax#2678.

@dpvc dpvc added this to the 3.2 milestone Apr 27, 2021
@dpvc dpvc requested a review from zorkow April 27, 2021 18:22
Copy link
Member

@zorkow zorkow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I note there is a another this.fontCache.clearCache(); in line 300. Would it make sense to let this use the clearFontCache method?

@dpvc
Copy link
Member Author

dpvc commented May 18, 2021

Would it make sense to let this use the clearFontCache method?

Sure. The reason I didn't was that that function was doing a lot of direct calls to this.fontCache already, so I considered the clearCache() call to be just one of those that manipulates the internal cache structure. The clearFontCache() method is more for objects outside the SVG jax to call (so they don't have to handle the internal fontCache value).

I can change it if you want, but I don't really see the need.

@dpvc dpvc merged commit e5844ea into master May 24, 2021
@dpvc dpvc deleted the issue2678 branch May 24, 2021 15:50
@dpvc dpvc restored the issue2678 branch May 24, 2021 16:01
@dpvc dpvc deleted the issue2678 branch May 24, 2021 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants