Skip to content

Commit

Permalink
client: Apply background to read-only code blocks as well
Browse files Browse the repository at this point in the history
  • Loading branch information
eliandoran committed Oct 27, 2024
1 parent d2235a1 commit f947a03
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/public/app/widgets/type_widgets/read_only_text.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f947a03

Please sign in to comment.