Commit 23c2e8b
committed
fix(snipsync): restrict target file scanning to .md/.mdx
snipsync.config.yaml never set features.allowed_target_extensions,
which snipsync defaults to [] ("scan every file under targets/docs").
Its Sync.js reads every scanned file line-by-line as UTF-8 text and
rewrites it the same way, which silently corrupts binary assets
(PNG/SVG) with non-UTF-8 bytes on every daily sync run.
Confirmed on PR #4908: a synced PNG grew from 1.1MB to 2.1MB and is
no longer a valid image (each non-UTF-8 byte, e.g. PNG's 0x89 magic
byte, was replaced with the 3-byte U+FFFD replacement character).
Restricting the scan to .md/.mdx (the only content types docs/
snippets live in) avoids touching the 6 PNGs and 3 SVGs in docs/.1 parent 2c2763f commit 23c2e8b
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
0 commit comments