mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2025-01-15 14:50:51 +01:00
server : Improve code snippets direction between RTL text (#11221)
This commit is contained in:
parent
091592d758
commit
c5bf0d1bd7
Binary file not shown.
@ -111,12 +111,12 @@ const VueMarkdown = defineComponent(
|
|||||||
highlight: function (str, lang) { // Add highlight.js
|
highlight: function (str, lang) { // Add highlight.js
|
||||||
if (lang && hljs.getLanguage(lang)) {
|
if (lang && hljs.getLanguage(lang)) {
|
||||||
try {
|
try {
|
||||||
return '<pre><code class="hljs">' +
|
return '<pre dir="auto"><code class="hljs">' +
|
||||||
hljs.highlight(str, { language: lang, ignoreIllegals: true }).value +
|
hljs.highlight(str, { language: lang, ignoreIllegals: true }).value +
|
||||||
'</code></pre>';
|
'</code></pre>';
|
||||||
} catch (__) {}
|
} catch (__) {}
|
||||||
}
|
}
|
||||||
return '<pre><code class="hljs">' + md.value.utils.escapeHtml(str) + '</code></pre>';
|
return '<pre dir="auto"><code class="hljs">' + md.value.utils.escapeHtml(str) + '</code></pre>';
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
// support latex with double dollar sign and square brackets
|
// support latex with double dollar sign and square brackets
|
||||||
|
Loading…
Reference in New Issue
Block a user