fix: use class in markdown rendering

This commit is contained in:
Paul Makles 2022-06-10 17:36:59 +01:00
parent bd50378234
commit 8a2826da91
2 changed files with 3 additions and 3 deletions

View file

@ -73,7 +73,7 @@ export default function Emoji({
}
export function generateEmoji(emoji: string) {
return `<img loading="lazy" className="emoji" draggable="false" alt="${emoji}" src="${parseEmoji(
return `<img loading="lazy" class="emoji" draggable="false" alt="${emoji}" src="${parseEmoji(
emoji,
)}" />`;
}

View file

@ -48,10 +48,10 @@ export const md: MarkdownIt = MarkdownIt({
const v = Prism.languages[lang];
if (v) {
const out = Prism.highlight(str, v, lang);
return `<pre className="code"><div className="lang"><div onclick="copycode(this)">${lang}</div></div><code className="language-${lang}">${out}</code></pre>`;
return `<pre class="code"><div class="lang"><div onclick="copycode(this)">${lang}</div></div><code class="language-${lang}">${out}</code></pre>`;
}
return `<pre className="code"><code>${md.utils.escapeHtml(
return `<pre class="code"><code>${md.utils.escapeHtml(
str,
)}</code></pre>`;
},