bugfix:cant correct display latex (#14910)

pull/14262/head
Likename Haojie 1 year ago committed by Bharat Ramanathan
parent a0165251ac
commit 19bced8dcd

@ -68,6 +68,7 @@ const preprocessLaTeX = (content: string) => {
return flow([
(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, (_, prefix, equation) => `${prefix}$${equation}$`),
])(content)

Loading…
Cancel
Save