server : Improve code snippets direction between RTL text (#11221)
This commit is contained in:
parent
091592d758
commit
c5bf0d1bd7
2 changed files with 2 additions and 2 deletions
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…
Add table
Add a link
Reference in a new issue