소스 검색

bugfix:cant correct display latex (#14910)

tags/1.0.1
Likename Haojie 8 달 전
부모
커밋
ff10a4603f
No account linked to committer's email address
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)

Loading…
취소
저장