mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-01-24 22:19:02 -06:00
client: Apply background to read-only code blocks as well
This commit is contained in:
@@ -136,6 +136,8 @@ export default class ReadOnlyTextTypeWidget extends AbstractTextTypeWidget {
|
||||
#setupSyntaxHighlight() {
|
||||
const codeBlocks = this.$content.find("pre code");
|
||||
for (const codeBlock of codeBlocks) {
|
||||
$(codeBlock).parent().toggleClass("hljs");
|
||||
|
||||
const text = codeBlock.innerText;
|
||||
|
||||
const normalizedMimeType = extractLanguageFromClassList(codeBlock);
|
||||
|
||||
Reference in New Issue
Block a user