80189ba449
Parser.Range used len(data)-len(highlight), which only matches suffix slices. Single-byte highlights like b[0:1] are subslices of the remaining buffer, so the wrong offset pointed at the end of the document (issue #1047). Use pointer-based subslice offset like wrapDecodeError. Add regression tests for unstable.Parser and toml.Unmarshal error positions and human-readable output. Co-authored-by: Thomas Pelletier <thomas@pelletier.dev>