A bare amount is given a position and spacing it never uses #36

Closed
opened 2026-08-16 00:35:29 +00:00 by rosa · 0 comments
Owner

What to build

When a Format shows the amount alone, the rendering code still settles on a
position and a spacing for the identifier it is not going to write. It picks
prefix and no space, values that mean nothing, and then carries them through a
match that has an arm for exactly this case.

Have the identifier decision yield an Option of the identifier together with
its position and spacing. A bare amount yields nothing, the invented values
disappear, and the dead arm downstream goes with them.

Rendering does not change: the same text comes out for every combination of
options.

Acceptance criteria

  • The identifier decision returns nothing at all for a bare amount, rather than unused placement values
  • The match arm that existed only to handle the absent identifier is gone
  • Every existing formatting test passes unchanged, including the round trip through Parser
  • mise run ci passes

Blocked by

None — can start immediately.

## What to build When a `Format` shows the amount alone, the rendering code still settles on a position and a spacing for the identifier it is not going to write. It picks prefix and no space, values that mean nothing, and then carries them through a match that has an arm for exactly this case. Have the identifier decision yield an `Option` of the identifier together with its position and spacing. A bare amount yields nothing, the invented values disappear, and the dead arm downstream goes with them. Rendering does not change: the same text comes out for every combination of options. ## Acceptance criteria - [ ] The identifier decision returns nothing at all for a bare amount, rather than unused placement values - [ ] The match arm that existed only to handle the absent identifier is gone - [ ] Every existing formatting test passes unchanged, including the round trip through `Parser` - [ ] `mise run ci` passes ## Blocked by None — can start immediately.
rosa closed this issue 2026-08-21 21:12:38 +00:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rosa/lucre#36
No description provided.