overleaf/server-ce/hotfix/4.2.5/pr_18819.patch
Jakob Ackermann aa142b3c09 Merge pull request #18825 from overleaf/jpa-hotfix-4-2-5-5-0-5
[server-pro] add hotfixes 4.2.5 and 5.0.5

GitOrigin-RevId: 55a138662d3c2059ce802e6a6fd70e70fd01c8cd
2024-06-12 08:05:32 +00:00

17 lines
639 B
Diff

--- a/services/web/frontend/js/features/mathjax/load-mathjax.ts
+++ b/services/web/frontend/js/features/mathjax/load-mathjax.ts
@@ -36,6 +36,15 @@ export const loadMathJax = async () => {
},
startup: {
typeset: false,
+ ready() {
+ window.MathJax.startup.defaultReady()
+ const safe = window.MathJax.startup.document.safe
+ safe.filterAttributes.set('fontfamily', 'filterFontFamily')
+ safe.filterMethods.filterFontFamily = (
+ _safe: any,
+ family: string
+ ) => family.split(/;/)[0]
+ },
},
}