Commit 66de222c authored by nick zheng's avatar nick zheng

chore: 完善数学公式优化显示的注释

parent 478ba65e
......@@ -54,8 +54,8 @@ const articleContainerStyle = computed(() => {
const katexDelimiters = (text: string) => {
/**
* 1. 将 \( 和 \\() 转为 $ 以支持行内公式
* 2. 将 \[ 和 \\[ 转为 $$ 以支持块级公式
* 1. 将 \(...\) 和 \\(...\\) 转为 $...$ 以支持行内公式
* 2. 将 \[...\] 和 \\[...\\] 转为 $$...$$ 以支持块级公式
*/
const replaceKatexText = text.replace(/\\\\\(|\\\\\)|\\\(|\\\)/g, '$').replace(/\\\\\[|\\\\\]|\\\[|\\\]/g, '$$$$')
return replaceKatexText
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment