Pārlūkot izejas kodu

bugfix:cant correct display latex (#14910)

tags/1.0.1
Likename Haojie pirms 8 mēnešiem
vecāks
revīzija
ff10a4603f
Revīzijas autora e-pasta adrese nav piesaistīta nevienam kontam
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1
    0
      web/app/components/base/markdown.tsx

+ 1
- 0
web/app/components/base/markdown.tsx Parādīt failu

@@ -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)

Notiek ielāde…
Atcelt
Saglabāt