Skip to content

Commit 97cee51

Browse files
committed
make fmt
1 parent 1b9496b commit 97cee51

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

docs/instruction-files.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,11 @@ Example:
7979

8080
```markdown
8181
## Model: sonnet
82+
8283
Be terse and to the point.
8384

84-
## Model: openai:.*codex
85+
## Model: openai:.\*codex
86+
8587
Use status reporting tools every few minutes.
8688
```
8789

src/node/utils/main/markdown.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ import MarkdownIt from "markdown-it";
22

33
type HeadingMatcher = (headingText: string, level: number) => boolean;
44

5-
function extractSectionByHeading(
6-
markdown: string,
7-
headingMatcher: HeadingMatcher
8-
): string | null {
5+
function extractSectionByHeading(markdown: string, headingMatcher: HeadingMatcher): string | null {
96
if (!markdown) return null;
107

118
const md = new MarkdownIt({ html: false, linkify: false, typographer: false });
@@ -51,7 +48,10 @@ export function extractModeSection(markdown: string, mode: string): string | nul
5148
if (!markdown || !mode) return null;
5249

5350
const expectedHeading = `mode: ${mode}`.toLowerCase();
54-
return extractSectionByHeading(markdown, (headingText) => headingText.toLowerCase() === expectedHeading);
51+
return extractSectionByHeading(
52+
markdown,
53+
(headingText) => headingText.toLowerCase() === expectedHeading
54+
);
5555
}
5656

5757
/**

0 commit comments

Comments
 (0)