oxidecomputer / oxidecomputer/prettier-plugin-asciidoc
separatorBefore and separatedFirstBlock ask whether a gap holds a + with two different tests
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Split from #325, row R7 (verified at main ffdc1860).
The question: does this gap hold a +?
The reader's answer: the recorded GapLine[] on the item block.
The two readers: separatorBefore in src/print/list.ts l.177 (leadingGap.lastIndexOf("+") + 1) and separatedFirstBlock in src/print/list-hazard.ts l.362 (gap.length > 0). Both read the recorded fact, so neither is a text re-derivation; they are two questions phrased differently over one record and can drift.
Remedy recorded on #325 (review finding): one shared gapHoldsAPlus(gap) predicate, not a recorded fact; a proposal to fold this into a tail fact was a category error because ItemBlock.gap stays either way.
Closes when: one predicate, two callers, and a test that the two former tests agreed on every gap the list-shape grid produces (or the witness where they did not, filed).
Related: #325 (the catalog), #90 (the class), #269 (the bodyless description tail, in flight; lands first).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with separatorBefore in src/print/list.ts at line 177 and separatedFirstBlock in src/print/list-hazard.ts at line 362, then inspect the list-shape grid tests. Confirm how each caller interprets the recorded GapLine[] and whether their existing tests agree. Done means one shared gap predicate is used by both callers, with coverage for every gap produced by the grid or a filed witness where they differ.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100