mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-09 09:42:28 +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() {
|
#setupSyntaxHighlight() {
|
||||||
const codeBlocks = this.$content.find("pre code");
|
const codeBlocks = this.$content.find("pre code");
|
||||||
for (const codeBlock of codeBlocks) {
|
for (const codeBlock of codeBlocks) {
|
||||||
|
$(codeBlock).parent().toggleClass("hljs");
|
||||||
|
|
||||||
const text = codeBlock.innerText;
|
const text = codeBlock.innerText;
|
||||||
|
|
||||||
const normalizedMimeType = extractLanguageFromClassList(codeBlock);
|
const normalizedMimeType = extractLanguageFromClassList(codeBlock);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user