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

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