chore(server): remove duplicate math handling
Some checks are pending
Checks / main (push) Waiting to run

This commit is contained in:
Elian Doran 2025-10-26 22:00:11 +02:00
parent 52a6f2597e
commit 3661733f07
No known key found for this signature in database

View File

@ -301,19 +301,6 @@ function renderText(result: Result, note: SNote | BNote) {
result.content = document.innerHTML ?? "";
if (result.content.includes(`<span class="math-tex">`)) {
result.header += `
<script src="../${assetPath}/node_modules/katex/dist/katex.min.js"></script>
<link rel="stylesheet" href="../${assetPath}/node_modules/katex/dist/katex.min.css">
<script src="../${assetPath}/node_modules/katex/dist/contrib/auto-render.min.js"></script>
<script src="../${assetPath}/node_modules/katex/dist/contrib/mhchem.min.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.getElementById('content'));
});
</script>`;
}
if (note.hasLabel("shareIndex")) {
renderIndex(result);
}