Skip to content

Commit 68b96c2

Browse files
committed
fix: moar math fix
1 parent 3846361 commit 68b96c2

File tree

1 file changed

+0
-11
lines changed
  • src/client/components/ChatV2

1 file changed

+0
-11
lines changed

src/client/components/ChatV2/util.ts

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,6 @@ const _preprocessMath = (content: string): string => {
2424
})
2525

2626
processedContent = processedContent
27-
28-
// Convert Latex align environments -> Katex aligned display math
29-
.replace(/\\begin\{(?:align\*?|aligned)\}([\s\S]*?)\\end\{(?:align\*?|aligned)\}/g, (_, innerContent) => {
30-
const alignedLines = innerContent
31-
.split('\n')
32-
.map((line) => line.trim())
33-
.filter((line) => line.length > 0)
34-
.join(' \\\\\n')
35-
return `$$\n\\begin{aligned}\n${alignedLines}\n\\end{aligned}\n$$`
36-
})
37-
3827
// Convert Latex display math \[...\] -> Katex display math `$$...$$`
3928
.replace(/\\\[([\s\S]*?)\\\]/g, (match, innerContent: string) => {
4029
return `\n$$\n${innerContent.replaceAll('\n', ' ').trim()}\n$$\n`

0 commit comments

Comments
 (0)