File tree Expand file tree Collapse file tree 1 file changed +1
-18
lines changed Expand file tree Collapse file tree 1 file changed +1
-18
lines changed Original file line number Diff line number Diff line change @@ -207,23 +207,6 @@ function CustomCode(props: { children: any; className?: string }) {
207
207
) ;
208
208
}
209
209
210
- function escapeDollarNumber ( text : string ) {
211
- let escapedText = "" ;
212
-
213
- for ( let i = 0 ; i < text . length ; i += 1 ) {
214
- let char = text [ i ] ;
215
- const nextChar = text [ i + 1 ] || " " ;
216
-
217
- if ( char === "$" && nextChar >= "0" && nextChar <= "9" ) {
218
- char = "\\$" ;
219
- }
220
-
221
- escapedText += char ;
222
- }
223
-
224
- return escapedText ;
225
- }
226
-
227
210
function escapeBrackets ( text : string ) {
228
211
const pattern =
229
212
/ ( ` ` ` [ \s \S ] * ?` ` ` | ` .* ?` ) | \\ \[ ( [ \s \S ] * ?[ ^ \\ ] ) \\ \] | \\ \( ( .* ?) \\ \) / g;
@@ -261,7 +244,7 @@ function tryWrapHtmlCode(text: string) {
261
244
262
245
function _MarkDownContent ( props : { content : string } ) {
263
246
const escapedContent = useMemo ( ( ) => {
264
- return tryWrapHtmlCode ( escapeBrackets ( escapeDollarNumber ( props . content ) ) ) ;
247
+ return tryWrapHtmlCode ( escapeBrackets ( props . content ) ) ;
265
248
} , [ props . content ] ) ;
266
249
267
250
return (
You can’t perform that action at this time.
0 commit comments