client: Use correct background for code note preview

This commit is contained in:
Elian Doran 2024-11-07 23:58:10 +02:00
parent 91fa1a6cb1
commit 1261bdbb29
No known key found for this signature in database

View File

@ -122,10 +122,10 @@ async function renderText(note, $renderedContent) {
async function renderCode(note, $renderedContent) {
const blob = await note.getBlob();
const $codeBlock = $("<pre>");
const $codeBlock = $("<code>");
$codeBlock.text(blob.content);
applySingleBlockSyntaxHighlight($codeBlock, mime_types.normalizeMimeTypeForCKEditor(note.mime));
$renderedContent.append($codeBlock);
$renderedContent.append($("<pre>").append($codeBlock));
await applySingleBlockSyntaxHighlight($codeBlock, mime_types.normalizeMimeTypeForCKEditor(note.mime));
}
function renderImage(entity, $renderedContent, options = {}) {