Spaces:
Sleeping
Sleeping
further fix latex rendering
Browse files- web/src/App.tsx +1 -1
web/src/App.tsx
CHANGED
|
@@ -157,7 +157,7 @@ function preprocessMathContent(content: string): string {
|
|
| 157 |
|
| 158 |
// Step 7: Wrap incomplete fractions like \frac{d} or \frac{d}dx by fixing them
|
| 159 |
// This handles cases where spacing breaks the pattern
|
| 160 |
-
processed = processed.replace(/\\frac\s*\{([^}]*)\}\s*([a-zA-Z]+)/g, (
|
| 161 |
return `$\\frac{${num}}{${den}}$`;
|
| 162 |
});
|
| 163 |
|
|
|
|
| 157 |
|
| 158 |
// Step 7: Wrap incomplete fractions like \frac{d} or \frac{d}dx by fixing them
|
| 159 |
// This handles cases where spacing breaks the pattern
|
| 160 |
+
processed = processed.replace(/\\frac\s*\{([^}]*)\}\s*([a-zA-Z]+)/g, (_match, num, den) => {
|
| 161 |
return `$\\frac{${num}}{${den}}$`;
|
| 162 |
});
|
| 163 |
|