@lobehub/ui 2.18.0 → 2.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -166,9 +166,11 @@ export function escapeCurrencyDollars(text) {
|
|
|
166
166
|
// 2. Inline code: `...`
|
|
167
167
|
// 3. Display math: $$...$$
|
|
168
168
|
// 4. Inline math with LaTeX commands: $...\...$ (must contain backslash to distinguish from currency)
|
|
169
|
-
// 5.
|
|
170
|
-
// 6.
|
|
171
|
-
|
|
169
|
+
// 5. Simple number formulas: $1$, $10$, $100$ (pure digits in math mode)
|
|
170
|
+
// 6. Number lists in math mode: $1,-1,0$ or $1,2,3$ (comma-separated numbers, possibly negative)
|
|
171
|
+
// 7. LaTeX bracket notation: \[...\]
|
|
172
|
+
// 8. LaTeX parenthesis notation: \(...\)
|
|
173
|
+
/(```[\S\s]*?```|`[^\n`]*`|\$\$[\S\s]*?\$\$|(?<!\\)\$(?!\$)(?=[\S\s]*?\\)[\S\s]*?(?<!\\)\$(?!\$)|\$\d+\$|\$-?\d+(?:,-?\d+)+\$|\\\[[\S\s]*?\\]|\\\(.*?\\\))/g, function (match) {
|
|
172
174
|
return manager.add(match);
|
|
173
175
|
});
|
|
174
176
|
|