perf: skip highlight.js auto-detection in read-only code blocks (#25824)

This commit is contained in:
Algorithm5838 authored and GitHub committed 2026-06-17 02:57:02 +02:00
1 parent b4aef82401
commit e031fadc35
1 file changed
+4 -2
@@ -563,8 +563,10 @@
result) && result) &&
'border-bottom-left-radius: 0px; border-bottom-right-radius: 0px;'}"><code 'border-bottom-left-radius: 0px; border-bottom-right-radius: 0px;'}"><code
class="language-{lang} rounded-t-none whitespace-pre text-sm" class="language-{lang} rounded-t-none whitespace-pre text-sm"
>{@html hljs.highlightAuto(code, hljs.getLanguage(lang)?.aliases).value || >{#if lang && hljs.getLanguage(lang)}{@html hljs.highlight(code, {
code}</code language: lang,
ignoreIllegals: true
}).value}{:else}{code}{/if}</code
></pre> ></pre>
{/if} {/if}
{:else} {:else}