File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
app/api/llms-txt/[...path] Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -337,10 +337,10 @@ function resolvePlatformIncludes(
337337 // Replace PlatformContent includes with actual content
338338 const includePattern = / < P l a t f o r m C o n t e n t [ ^ > ] * i n c l u d e P a t h = " ( [ ^ " ] * ) " [ ^ > ] * \/ > / g;
339339 let result = content ;
340- let match ;
340+ let match = includePattern . exec ( content ) ;
341341
342342 // Fix assignment in while condition by using a separate variable
343- while ( ( match = includePattern . exec ( content ) ) !== null ) {
343+ while ( match !== null ) {
344344 const includePath = match [ 1 ] ;
345345 const fullMatch = match [ 0 ] ;
346346
@@ -385,6 +385,9 @@ function resolvePlatformIncludes(
385385 `\n*[${ sectionName . charAt ( 0 ) . toUpperCase ( ) + sectionName . slice ( 1 ) } instructions would appear here]*\n`
386386 ) ;
387387 }
388+
389+ // Get the next match
390+ match = includePattern . exec ( content ) ;
388391 }
389392
390393 return Promise . resolve ( result ) ;
You can’t perform that action at this time.
0 commit comments