3 Commits
Author SHA1 Message Date
Joeseph GreyandGitHub 86ce5860d5 fix: reject negative indent instead of panicking (#2746) 2026-08-03 11:37:58 +10:00
Joeseph GreyandGitHub b7a06d6e1f fix: parse signed hex and octal integers (#2749) 2026-08-03 11:36:24 +10:00
Joeseph GreyandGitHub 9246871b8b fix: skip UTF-8 BOM when processing front matter (#2751)
* fix: skip UTF-8 BOM when processing front matter

--front-matter=process wrapped the file in a bufio.Reader without
skipping a leading UTF-8 BOM, so a BOM before the opening --- meant the
separator was not recognised and the opening --- was dropped from the
output (data loss). Skip the BOM with utfbom.Skip before wrapping the
reader, matching the CSV object decoder.

* refactor: inline UTF-8 BOM skip instead of utfbom dependency

per ccoVeille's review, front matter only needs UTF-8 BOM handling, not
the full utfbom package. replace utfbom.Skip with a small unexported
stripUTF8BOM helper and add a stdin-path regression test alongside the
existing file-path one. utfbom stays in go.mod since decoder_csv_object.go
still uses it for CSV decoding.
2026-08-03 11:29:33 +10:00