mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-19 04:10:26 -05:00
perf: skip highlight.js auto-detection in read-only code blocks (#25824)
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user