bugfix:cant correct display latex (#14910)
This commit is contained in:
parent
53eb56bb1e
commit
ff10a4603f
1 changed files with 1 additions and 0 deletions
|
|
@ -68,6 +68,7 @@ const preprocessLaTeX = (content: string) => {
|
||||||
|
|
||||||
return flow([
|
return flow([
|
||||||
(str: string) => str.replace(/\\\[(.*?)\\\]/g, (_, equation) => `$$${equation}$$`),
|
(str: string) => str.replace(/\\\[(.*?)\\\]/g, (_, equation) => `$$${equation}$$`),
|
||||||
|
(str: string) => str.replace(/\\\[(.*?)\\\]/gs, (_, equation) => `$$${equation}$$`),
|
||||||
(str: string) => str.replace(/\\\((.*?)\\\)/g, (_, equation) => `$$${equation}$$`),
|
(str: string) => str.replace(/\\\((.*?)\\\)/g, (_, equation) => `$$${equation}$$`),
|
||||||
(str: string) => str.replace(/(^|[^\\])\$(.+?)\$/g, (_, prefix, equation) => `${prefix}$${equation}$`),
|
(str: string) => str.replace(/(^|[^\\])\$(.+?)\$/g, (_, prefix, equation) => `${prefix}$${equation}$`),
|
||||||
])(content)
|
])(content)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue