This commit is contained in:
@@ -8,14 +8,17 @@
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||||
<link rel="stylesheet" href="style.css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
||||
<script>
|
||||
window.MathJax = {
|
||||
tex: {
|
||||
inlineMath: [['$', '$'], ['\\(', '\\)']]
|
||||
},
|
||||
options: {
|
||||
skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre']
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@@ -15,8 +15,12 @@ async function showfile(filename, target) {
|
||||
|
||||
container.innerHTML = marked.parse(markdownRaw);
|
||||
|
||||
if (window.MathJax) {
|
||||
MathJax.typesetPromise([container]);
|
||||
if (window.MathJax && typeof MathJax.typesetPromise === 'function') {
|
||||
MathJax.typesetPromise([container]).catch(function (err) {
|
||||
console.error("Errore nel rendering di MathJax: ", err);
|
||||
});
|
||||
} else if (window.MathJax && window.MathJax.typeset) {
|
||||
MathJax.typeset([container]);
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user