mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-01 20:52:27 +08:00
client: Apply background to read-only code blocks as well
This commit is contained in:
parent
d2235a185b
commit
f947a039b9
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user