client: Apply background to read-only code blocks as well

pull/526/head
Elian Doran 2024-10-27 19:58:00 +07:00
parent d2235a185b
commit f947a039b9
No known key found for this signature in database
1 changed files with 2 additions and 0 deletions

@ -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);