oxidecomputer / oxidecomputer/prettier-plugin-asciidoc
The reader records what the head drain took and what the separator after it does, and the printer's separator rule reads it
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
What this is
The reader records, per list item, whether the head drain took the item's comment run and what the separator after that run does (arms the next block on one blank, detaches it on two: parser.rb l.1483 and l.1549), and the printer's one separator rule reads that fact. The three children are the three faces of the printer re-deriving it from text today: drainTakesWholeBody (#171) and drainTakesItemBody (#259) ask the run's words, so a run carrying a second word or an inline node fails the test (#267); the tail printer does not know a drained run needs a shield and writes a + pair adjacent (#268); an empty description body under a + never reaches either predicate, so two blanks print as one and the detached block is pulled in (#269).
The fact
A recorded arm on the item (or its term entry), set where the drain runs: none (no run drained), dropped (the run renders nothing; the reference's drop arm), detached (the run is the item's first block behind an empty gap; the reference's peek unshifts it), each carrying the separator the source spelled after the run (its blank count and whether a + stood there). The fact is carried by bytes the printer writes back (the run's lines, the blank count, the +), so pass 2 re-derives it: the surviving-bytes answer is "the carrying bytes are re-emitted".
What it replaces
Both printer predicates and the word test go; printsDrainShield becomes a read of the fact; listTailContinuationActive and separatorAfter keep owning the blank count. Every deleted function lands with its cells: the closed issue whose fix it was (#171, #259, #262), that issue's witness verbatim, the fact arm that makes the witness a fixed point, the test that reddens under a mutant of that arm, and the direction.
Gate
The three children's witnesses as red-first pins through expectFormatted; the #171 and #259 rows unchanged; the 7740-document description grid and the 10,269-document marker grid the reviews ran, 0 regressions; the reparse ledger's gap-line-lost and separator-collapsed families shrink (report the rows); a fact-inventory row for the new field. Lands after #240 (the recorded-fact pattern and the shared layer it lands are the shape to follow) and after the #259 and #171 landings.
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 the recorded-fact pattern and shared layer from #240, then inspect parser.rb around lines 1483 and 1549 and the printer entry points named in the issue. Trace the three witnesses through expectFormatted, including the 7740-document and 10,269-marker grids. Done means the three witnesses are red-first pins, the cited rows remain unchanged, the grids have 0 regressions, and the reparse ledger families shrink with a fact-inventory row added.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100