Skip to content

Commit 81b01a0

Browse files
MajorTalclaude
andcommitted
test(sync): normalize {foo} params in llms.txt endpoint matcher
Accept both :foo and {foo} placeholder styles when comparing documented endpoints against the surface list. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 97d3db6 commit 81b01a0

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

sync.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -522,9 +522,9 @@ describe("llms.txt alignment", { skip: !llmsTxtAvailable && "~/dev/run402/site/l
522522
return !surfaceEndpoints.some(se => {
523523
// Exact match
524524
if (se === ep) return true;
525-
// Match with different param names: normalize :foo to :param
526-
const normDoc = ep.replace(/:[a-z_]+/g, ":param");
527-
const normSurf = se.replace(/:[a-z_]+/g, ":param");
525+
// Match with different param names: normalize :foo and {foo} to :param
526+
const normDoc = ep.replace(/:[a-z_]+/g, ":param").replace(/\{[a-z_]+\}/g, ":param");
527+
const normSurf = se.replace(/:[a-z_]+/g, ":param").replace(/\{[a-z_]+\}/g, ":param");
528528
return normDoc === normSurf;
529529
});
530530
});

0 commit comments

Comments
 (0)