Development record
The strip-a-matched-quote-pair-then-frontmatter.Unquote idiom now exists in three places: capture's reader (internal/core/capture/parse.go decodeScalar), record-lint's schema gate (internal/core/lint/schema.go readerScalar) and the cold-reading definition locator (internal/core/reading/definitions.go scalar). Unquote's own doc says its argument is the scalar's INNER text, so every caller that reads a possibly-quoted frontmatter value has to do the strip first, and a caller that forgets it -- as the locator's first cut did -- refuses well-formed records with a message comparing a value against itself. The idiom belongs beside Unquote in internal/core/frontmatter, with the three call sites moved onto it.
The strip-a-matched-quote-pair-then-frontmatter.Unquote idiom now exists in three places: capture's reader (internal/core/capture/parse.go decodeScalar), record-lint's schema gate (internal/core/lint/schema.go readerScalar) and the cold-reading definition locator (internal/core/reading/definitions.go scalar). Unquote's own doc says its argument is the scalar's INNER text, so every caller that reads a possibly-quoted frontmatter value has to do the strip first, and a caller that forgets it -- as the locator's first cut did -- refuses well-formed records with a message comparing a value against itself. The idiom belongs beside Unquote in internal/core/frontmatter, with the three call sites moved onto it.
Grounds
- pursued: one strip beside the decoder means no reader can forget it; a reader that still hand-strips quotes before frontmatter.Unquote would show it wrong
Frontmatter
| id | iss-2608311039531552 |
|---|---|
| type | issue |
| lifecycle | resolved |
| severity | minor |
.abcd/work/issues/resolved/iss-2608311039531552-the-strip-a-matched-quote-pair-then.md
open on GitHub ↗ · commit history ↗
mentions1
- itd-184Four cold-reading definitions, one blindness core — each position licenses a different output, and none may hold another's licence