Code block outlook doesn't work well

The code block works fine in the past. However, there is an user created a new post with code block yesterday, and I found the format failed. Not only this post with block code, but also whole site.

I just rebuild discourse app to the most update version, but the result is still the same.

How can I solve this issue? Thanks for help.

Here comes the url:

The code blocks look fine to me, do you have a screenshot of the code block format failing?

1 Like

Code Block Sections are not classified by colors after upgrade discourse 2.9.0.beta6

rainbow

mono-blue

1 Like

Thanks for great input.

However, it seems meta discourse forum is version 2.9.0.beta6(cause it support “Loading splash screen” now). And the code block works fine here.

My bad. I should say color outlook instead.

figure 1. the color of python(actually all language) keyword doesn’t highlight

original post:


figure 2. however, the color diff of code block still works fine

original post:

1 Like

My Solution

  1. uninstall component “hljs-theme-picker”

  2. pick up the one css file ( I picked up rainbow.css) from the below

  1. edit theme CSS/HTML, copy and paste contents in rainbow.css

This is wrong???

2 Likes

Many thanks to Takanobu san.

This solution works fine.

I think this means discourse hljs theme picker has some hidden bug. No reason the same code works fine with CSS but failed on component installed.

And I’m sorry that I will not set your solusion as :white_check_mark: Soluion, though it truly solve my problem. I leave it as open and hope discourse team @cocococosti can find out the reason behind and work out a formal solution.

The CSS code I use is what I set in hljs theme picker:

Many thanks again.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.