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';
|
import katex from 'katex';
|
||||||
|
|
||||||
const DELIMITER_LIST = [
|
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: false },
|
||||||
{ left: '$$', right: '$$', display: true },
|
|
||||||
{ left: '\\pu{', right: '}', display: false },
|
{ left: '\\pu{', right: '}', display: false },
|
||||||
{ left: '\\ce{', right: '}', display: false },
|
{ left: '\\ce{', right: '}', display: false },
|
||||||
{ left: '\\(', right: '\\)', display: false },
|
{ left: '\\(', right: '\\)', display: false },
|
||||||
{ left: '( ', right: ' )', display: false },
|
{ left: '\\[\n', right: '\n\\]', display: true },
|
||||||
{ left: '\\[', right: '\\]', display: true },
|
{ left: '\\[', right: '\\]', display: false },
|
||||||
{ left: '[ ', right: ' ]', display: true }
|
|
||||||
];
|
];
|
||||||
|
|
||||||
// const DELIMITER_LIST = [
|
// const DELIMITER_LIST = [
|
||||||
@ -55,8 +55,8 @@ const { inlineRule, blockRule } = generateRegexRules(DELIMITER_LIST);
|
|||||||
export default function (options = {}) {
|
export default function (options = {}) {
|
||||||
return {
|
return {
|
||||||
extensions: [
|
extensions: [
|
||||||
inlineKatex(options),
|
|
||||||
blockKatex(options),
|
blockKatex(options),
|
||||||
|
inlineKatex(options),
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user