We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f3a2095 + 16aadbf commit 3525be5Copy full SHA for 3525be5
1 file changed
docs/scripts/sync-agent-skills.mjs
@@ -11,13 +11,13 @@ const outputDir = path.join(
11
'docs/static/.well-known/agent-skills'
12
);
13
function readFrontmatter(markdown, sourcePath) {
14
- const match = markdown.match(/^---\n([\s\S]*?)\n---\n/);
+ const match = markdown.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n/);
15
if (!match) {
16
throw new Error(`${sourcePath} is missing YAML frontmatter`);
17
}
18
19
const frontmatter = {};
20
- for (const line of match[1].split('\n')) {
+ for (const line of match[1].split(/\r?\n/)) {
21
const field = line.match(/^([a-zA-Z0-9_-]+):\s*(.*)$/);
22
if (field) {
23
frontmatter[field[1]] = field[2].replace(/^"(.*)"$/, '$1');
0 commit comments