Переглянути джерело

bugfix:cant correct display latex (#14910)

tags/1.0.1
Likename Haojie 8 місяці тому
джерело
коміт
ff10a4603f
Аккаунт користувача з таким Email не знайдено
1 змінених файлів з 1 додано та 0 видалено
  1. 1
    0
      web/app/components/base/markdown.tsx

+ 1
- 0
web/app/components/base/markdown.tsx Переглянути файл

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

Завантаження…
Відмінити
Зберегти