mirror of
https://github.com/open-webui/open-webui
synced 2024-11-16 05:24:02 +00:00
fix: Change inline and block delimiters
This commit is contained in:
parent
e48d66f918
commit
3f1255b39e
@ -1,14 +1,14 @@
|
||||
import katex from 'katex';
|
||||
|
||||
const DELIMITER_LIST = [
|
||||
{ left: '$$\n', right: '\n$$', display: true },
|
||||
{ left: '$$', right: '$$', display: false }, // This should be on top to prevent conflict with $ delimiter
|
||||
{ left: '$', right: '$', display: false },
|
||||
{ left: '$$', right: '$$', display: true },
|
||||
{ left: '\\pu{', right: '}', display: false },
|
||||
{ left: '\\ce{', right: '}', display: false },
|
||||
{ left: '\\(', right: '\\)', display: false },
|
||||
{ left: '( ', right: ' )', display: false },
|
||||
{ left: '\\[', right: '\\]', display: true },
|
||||
{ left: '[ ', right: ' ]', display: true }
|
||||
{ left: '\\[\n', right: '\n\\]', display: true },
|
||||
{ left: '\\[', right: '\\]', display: false },
|
||||
];
|
||||
|
||||
// const DELIMITER_LIST = [
|
||||
@ -55,8 +55,8 @@ const { inlineRule, blockRule } = generateRegexRules(DELIMITER_LIST);
|
||||
export default function (options = {}) {
|
||||
return {
|
||||
extensions: [
|
||||
inlineKatex(options),
|
||||
blockKatex(options),
|
||||
inlineKatex(options),
|
||||
]
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user