mirror of
https://github.com/revoltchat/revite.git
synced 2024-12-25 23:22:06 -05:00
fix: use class
in markdown rendering
This commit is contained in:
parent
bd50378234
commit
8a2826da91
2 changed files with 3 additions and 3 deletions
|
@ -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,
|
||||
)}" />`;
|
||||
}
|
||||
|
|
|
@ -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>`;
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue