Update KaTeX to v0.13.9 (#1925)

* Update KaTeX to v0.13.9

* Allow KaTeX commands like \url and \includegraphics
https://katex.org/docs/options.html
This commit is contained in:
Jules-Bertholet
2021-05-08 14:58:56 -04:00
committed by GitHub
parent 1308dc20e8
commit a410ed1b74
76 changed files with 15750 additions and 7252 deletions

View File

@@ -134,7 +134,7 @@ async function setContentPane() {
if ($content.find('span.math-tex').length > 0) {
await libraryLoader.requireLibrary(libraryLoader.KATEX);
renderMathInElement($content[0], {});
renderMathInElement($content[0], {trust: true});
}
}
else if (revisionItem.type === 'code') {

View File

@@ -24,7 +24,7 @@ async function getRenderedContent(note, options = {}) {
if ($renderedContent.find('span.math-tex').length > 0) {
await libraryLoader.requireLibrary(libraryLoader.KATEX);
renderMathInElement($renderedContent[0], {});
renderMathInElement($renderedContent[0], {trust: true});
}
}
else if (type === 'code') {

View File

@@ -224,7 +224,7 @@ export default class NoteDetailWidget extends TabAwareWidget {
<script>
document.body.className += ' ck-content printed-content';
renderMathInElement(document.body, {});
renderMathInElement(document.body, {trust: true});
</script>
`,
importCSS: false,

View File

@@ -103,7 +103,7 @@ export default class ReadOnlyTextTypeWidget extends AbstractTextTypeWidget {
if (this.$content.find('span.math-tex').length > 0) {
await libraryLoader.requireLibrary(libraryLoader.KATEX);
renderMathInElement(this.$content[0], {});
renderMathInElement(this.$content[0], {trust: true});
}
}