Skip to content

Commit

Permalink
client: Use correct background for code note preview
Browse files Browse the repository at this point in the history
  • Loading branch information
eliandoran committed Nov 7, 2024
1 parent 91fa1a6 commit 1261bdb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/public/app/services/content_renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}) {
Expand Down

0 comments on commit 1261bdb

Please sign in to comment.