Skip to content

Commit

Permalink
fix rendering of math on non-root paths, closes #4713
Browse files Browse the repository at this point in the history
  • Loading branch information
zadam committed Mar 28, 2024
1 parent 1e26b31 commit becac5f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/share/content_renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ function renderText(result, note) {

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 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'));
Expand Down

0 comments on commit becac5f

Please sign in to comment.