fraudTech commited on
Commit
5bc5acb
·
1 Parent(s): 8853b60

fix latex

Browse files
Files changed (1) hide show
  1. web/src/mathjax-config.ts +1 -1
web/src/mathjax-config.ts CHANGED
@@ -117,7 +117,7 @@ export function preprocessMathContent(content: string): string {
117
  // 2. Not already in $ delimiters
118
  // 3. Not inside code blocks
119
  processed = processed.replace(
120
- /^(?!\s*\$)(\s*\\(?:frac|le|ge|sqrt|cdot|ln|text|quad|implies|iff|ne|in|sum|prod|int|lim|infty|alpha|beta|gamma|delta|epsilon|theta|phi|psi|omega|mathbb|mathrm|begin|end)[^\n$]+)$/gm,
121
  (match) => {
122
  // Check if it looks like a standalone math expression
123
  // Count backslash commands - if 2 or more, it's likely math
 
117
  // 2. Not already in $ delimiters
118
  // 3. Not inside code blocks
119
  processed = processed.replace(
120
+ /^(?!\s*\$)(\s*\\(?:frac|le|ge|sqrt|cdot|ln|text|quad|implies|iff|ne|in|sum|prod|int|oint|iint|iiint|lim|infty|alpha|beta|gamma|delta|epsilon|theta|phi|psi|omega|mathbb|mathbf|mathrm|begin|end|partial|left|right|times)[^\n$]+)$/gm,
121
  (match) => {
122
  // Check if it looks like a standalone math expression
123
  // Count backslash commands - if 2 or more, it's likely math