mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-28 05:27:35 +00:00
perf: skip highlight.js auto-detection in read-only code blocks (#25824)
This commit is contained in:
parent
b4aef82401
commit
e031fadc35
1 changed files with 4 additions and 2 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue