File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import markedFootnote from "marked-footnote";
6
6
import { gfmHeadingId } from "marked-gfm-heading-id" ;
7
7
import Prism from "prismjs" ;
8
8
import sanitizeHtml from "sanitize-html" ;
9
- import htmlEscape from "he" ;
9
+ import he from "he" ;
10
10
import katex from "katex" ;
11
11
12
12
import { CSS , KATEX_CLASSES , KATEX_CSS } from "./style.js" ;
@@ -56,7 +56,7 @@ export class Renderer extends Marked.Renderer {
56
56
? Prism . languages [ language ]
57
57
: undefined ;
58
58
if ( grammar === undefined ) {
59
- return `<pre><code class="notranslate">${ htmlEscape ( code ) } </code></pre>` ;
59
+ return `<pre><code class="notranslate">${ he . encode ( code ) } </code></pre>` ;
60
60
}
61
61
const html = Prism . highlight ( code , grammar , language ! ) ;
62
62
return `<div class="highlight highlight-source-${ language } notranslate"><pre>${ html } </pre></div>` ;
You can’t perform that action at this time.
0 commit comments