Skip to content

Commit 3525be5

Browse files
author
rain
committed
Merge remote-tracking branch 'origin/master' into bot/docs-audit
2 parents f3a2095 + 16aadbf commit 3525be5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/scripts/sync-agent-skills.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ const outputDir = path.join(
1111
'docs/static/.well-known/agent-skills'
1212
);
1313
function readFrontmatter(markdown, sourcePath) {
14-
const match = markdown.match(/^---\n([\s\S]*?)\n---\n/);
14+
const match = markdown.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n/);
1515
if (!match) {
1616
throw new Error(`${sourcePath} is missing YAML frontmatter`);
1717
}
1818

1919
const frontmatter = {};
20-
for (const line of match[1].split('\n')) {
20+
for (const line of match[1].split(/\r?\n/)) {
2121
const field = line.match(/^([a-zA-Z0-9_-]+):\s*(.*)$/);
2222
if (field) {
2323
frontmatter[field[1]] = field[2].replace(/^"(.*)"$/, '$1');

0 commit comments

Comments
 (0)