mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-10-29 03:23:25 +08:00
client: Use correct background for code note preview
This commit is contained in:
parent
91fa1a6cb1
commit
1261bdbb29
@ -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 = {}) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user