Skip to content

Commit 913398a

Browse files
committed
fix(test): use String#startsWith over regex with caret for AGENTS.md template H2 parser
1 parent 88caa14 commit 913398a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/agents/workspace-templates.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ describe("AGENTS.md template content priority order", () => {
6464
const content = await fs.readFile(templatePath, "utf-8");
6565
return content
6666
.split("\n")
67-
.filter((line) => /^## /.test(line))
68-
.map((line) => line.replace(/^## /, "").trim());
67+
.filter((line) => line.startsWith("## "))
68+
.map((line) => line.slice("## ".length).trim());
6969
}
7070

7171
it("places Red Lines before Memory and Group Chats", async () => {

0 commit comments

Comments
 (0)