Commit 392cb4f
fix(docs-sync): use awk to extract only first frontmatter block (#19)
The sed range pattern '/^---$/,/^---$/p' restarts after termination,
capturing every '^---$' pair in the file. Files with markdown HR
separators in the body (api-reference.md upstream has 65) had their
content doubled on each sync, then re-doubled on the next.
Replaced with an awk single-state-machine: increments n on each ---,
prints the line, exits at the second ---; in between, prints body
lines. Idempotent for files with body HR separators; behavior
unchanged for files without (mcp.md, platform.md, etc.).
Verified by re-running the sync after the fix:
Sync complete: 0 updated, 4 unchanged, 0 failed
api-reference.md stays at 1861 lines (was doubling to 2906 with the
sed pattern). Closes #19.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 2bcd7cc commit 392cb4f
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
241 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
242 | 246 | | |
243 | 247 | | |
244 | 248 | | |
| |||
0 commit comments