[DURACOM-273] fix markdown rendering applying before mathjax rendering

This commit is contained in:
Andrea Barbasso
2024-06-07 14:58:50 +02:00
parent 1de8423ab7
commit 66e1a2488b
5 changed files with 32 additions and 22 deletions

View File

@@ -31,7 +31,7 @@ export class ClientMathService extends MathService {
protected mathJaxOptions = {
tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']],
inlineMath: [['$', '$'], ['$$', '$$'], ['\\(', '\\)']],
},
svg: {
fontCache: 'global',
@@ -108,7 +108,7 @@ export class ClientMathService extends MathService {
*/
render(element: HTMLElement) {
if (environment.markdown.mathjax) {
this._window.nativeWindow.MathJax.typesetPromise([element]);
return (window as any).MathJax.typesetPromise([element]) as Promise<any>;
}
}
}