لماذا لا يتم تمييز كود HTML في كتل الأكواد على ميتا؟

When I create an HTML codeblock, the code isn’t highlighted:

<li><a class="widget-link" href="" title=""><span class="d-label"></span></a></li>

However, it is on my own Discourse forums:

Why is HTML code not properly highlighted here?

3 إعجابات

We have the default code lang setting set to text for some reason I’m unaware of… by default it’s auto AND we also don’t have HTML in the list for the highlighted languages setting for another reason I’m unaware of. Setting the formatting to XML still works.

5 إعجابات
<li><a class="widget-link" href="" title=""><span class="d-label"></span></a></li>

That will do. :+1:

إعجاب واحد (1)

I’ve run into this before, but C# also doesn’t work.

إعجابَين (2)

I just merged a fix for this one: DEV: Add support for aliases in HighlightJS languages (#20380) · discourse/discourse@c052df4 · GitHub

6 إعجابات