mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-17 16:38:54 +00:00
The reader's three-pass pipeline (backslash-join -> fold "+"-continuations onto raw lines -> split each folded line on ": ") broke on fields written as bare "Name:" (colon, no trailing space, no value) whose value is supplied entirely by following "+" lines -- the idiomatic recutils pattern for e.g. a "%doc:" field. Folding the continuation onto the raw line destroyed the ": " substring needed for the later split, so parsing such a field crashed with a "missing field separator" error, even on well-formed input. Found by testing against GNU recutils' own tutorial example (books.rec, from the manual's "A Little Example" page), now added as a fixture. Restructured parsing to split each line into a key/value field before folding continuations, so folding happens on the value rather than the raw line; when the preceding value is empty, the continuation becomes the value outright instead of gaining a spurious leading newline. Adds regression coverage (test/cases/io-recutils/0006, 0007) and a docs section covering the empty-value + continuation pattern. Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| constants.go | ||
| doc.go | ||
| fixed_width_splitter.go | ||
| fixed_width_splitter_test.go | ||
| line_reader.go | ||
| pseudo_reader_gen.go | ||
| README.md | ||
| record_reader.go | ||
| record_reader_benchmark_test.go | ||
| record_reader_csv.go | ||
| record_reader_csvlite.go | ||
| record_reader_dcf.go | ||
| record_reader_dkvp_nidx.go | ||
| record_reader_dkvp_test.go | ||
| record_reader_dkvpx.go | ||
| record_reader_dkvpx_test.go | ||
| record_reader_factory.go | ||
| record_reader_json.go | ||
| record_reader_markdown.go | ||
| record_reader_pprint.go | ||
| record_reader_rec.go | ||
| record_reader_rec_test.go | ||
| record_reader_tsv.go | ||
| record_reader_xtab.go | ||
| record_reader_yaml.go | ||
| splitters.go | ||
Logic for parsing disk-file/standard-input byte streams into records.
There is one record-reader type per supported input file format, and a factory method.