Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
Add temporary flickering fix
Sauli Anto8e00885b2921
diff --git a/src/utils.js b/src/utils.jsindex fcd6825811..ce9412cd23 100644--- a/src/utils.js+++ b/src/utils.js@@ -28,15 +28,15 @@ export function renderEquation( equation, element, engine = 'katex', display = fMathJax.startup.document.updateDocument();} );} else {- if ( display ) {- element.innerHTML = '\\[' + equation + '\\]';- } else {- element.innerHTML = '\\(' + equation + '\\)';- }- // Fixme: MathJax render occasionally math processing error without timeout+ // Fixme: MathJax typesetting cause occasionally math processing error without timeoutsetTimeout( () => {+ if ( display ) {+ element.innerHTML = '\\[' + equation + '\\]';+ } else {+ element.innerHTML = '\\(' + equation + '\\)';+ }MathJax.Hub.Queue( [ 'Typeset', MathJax.Hub, element ] );- }, 100);+ }, 50);}} else if ( engine === 'katex' && typeof katex !== 'undefined' ) {katex.render( equation, element, {