File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,9 @@ return fetchWithTimeout('/llms.txt')
1212 const ct = response . headers . get ( 'Content-Type' ) || '' ;
1313 if ( ! ct . toLowerCase ( ) . includes ( 'text/plain' ) ) return JSON . stringify ( { valid :0 , message : ct , error : "Invalid content type" } ) ;
1414 return response . text ( ) . then ( text => {
15- const m = s => ( text . match ( new RegExp ( `\\${ s } ` , 'g' ) ) || [ ] ) . length ;
16- if ( ( text . match ( / ` ` ` / g ) || [ ] ) . length % 2 ) return JSON . stringify ( { valid :0 , error :"Invalid markdown fences " } ) ;
17- if ( m ( '[' ) !== m ( ']' ) || m ( '(' ) !== m ( ')' ) ) return JSON . stringify ( { valid :0 , error :"Unmatched braces " } ) ;
15+ const m = s => ( text . match ( new RegExp ( `\\${ s } ` , 'g' ) ) || [ ] ) . length ;
16+ if ( m ( '[' ) !== m ( ']' ) || m ( '(' ) !== m ( ')' ) ) return JSON . stringify ( { valid :0 , error :"Invalid markdown: Unmatched braces " } ) ;
17+ if ( ( text . match ( / ` ` ` / g ) || [ ] ) . length % 2 ) return JSON . stringify ( { valid :0 , error :"Invalid markdown: Uneven code fences " } ) ;
1818 return JSON . stringify ( { valid :1 } ) ;
1919 } ) ;
2020 } )
You can’t perform that action at this time.
0 commit comments