File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 265265 os .getenv ("LLM_SLOW_TOKEN_RATE_THRESHOLD" , "10.0" )) # tokens per second
266266
267267# APP Version
268- APP_VERSION = "v1.7.4"
268+ APP_VERSION = "v1.7.4.1 "
Original file line number Diff line number Diff line change @@ -336,12 +336,14 @@ const convertLatexDelimiters = (content: string): string => {
336336 if ( ! content . includes ( '\\(' ) && ! content . includes ( '\\[' ) ) {
337337 return content ;
338338 }
339-
340- return content
341- // Convert \( ... \) to $ ... $ (inline math)
342- . replace ( / \\ \( ( [ \s \S ] * ?) \\ \) / g, '$$1$' )
343- // Convert \[ ... \] to $$ ... $$ (display math)
344- . replace ( / \\ \[ ( [ \s \S ] * ?) \\ \] / g, '$$$$1$$\n' ) ;
339+
340+ return (
341+ content
342+ // Convert \( ... \) to $ ... $ (inline math)
343+ . replace ( / \\ \( ( [ \s \S ] * ?) \\ \) / g, ( _match , inner ) => `$${ inner } $` )
344+ // Convert \[ ... \] to $$ ... $$ (display math)
345+ . replace ( / \\ \[ ( [ \s \S ] * ?) \\ \] / g, ( _match , inner ) => `$$${ inner } $$\n` )
346+ ) ;
345347} ;
346348
347349export const MarkdownRenderer : React . FC < MarkdownRendererProps > = ( {
You canβt perform that action at this time.
0 commit comments