firstOwnLine walks node kinds to re-derive whether the head drain reached the end of the item's text
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 78/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- tooling
Research direction
Start with ItemBody.headDrain in src/head-drain-record.ts and its consumer in src/parse/lines/list-item-node.ts, then inspect firstOwnLine in src/print/list-hazard.ts around line 283. Replace the node-kind walk with the recorded headDrain fact and remove the walk. Validate the change with a perturbation on the list-shape grid showing both answers were equal before the change.
Written by the indexing model from the issue text.
Description
Split from #325, row R6 (verified at main ffdc1860).
The question: did a drain reach the end of the item's text?
The reader's answer: ItemBody.headDrain (src/head-drain-record.ts), written by the list scan.
The second answerer: firstOwnLine in src/print/list-hazard.ts l.283, a walk over node kinds returning comment | hardBreak | undefined; the comment above it states the equivalence with the recorded fact in words.
Constraint from #325: HeadDrainFact has a second live consumer at src/parse/lines/list-item-node.ts (the drain.kind === "detached" clause, byte-witnessed by mutation: disabling it makes * <95 cols>\n// c\n+\n\nnext\n wrap, and wrap again on the second pass). Deleting the record is foreclosed; the printer reads it instead.
Closes when: firstOwnLine reads headDrain and the walk is deleted, with a perturbation showing the two answers were equal on the list-shape grid before the change.
Related: #325 (the catalog), #90 (the class), #274 (the separator half of the head drain record).
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
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.
More from oxidecomputer/prettier-plugin-asciidoc
-
mechanism:instrument
Difficulty 1/5 Under an hour Newbie friendliness 88/100
oxidecomputer/prettier-plugin-asciidoc#193 · 2 comments ·
-
conformance mechanism:block-reading obligation:meaning-preservation tier-1
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
An indented setext title under a substituting directive opens a literal block and loses the section Openconformance mechanism:block-reading obligation:meaning-preservation tier-1
Difficulty 4/5 3-5 days Newbie friendliness 68/100
-
mechanism:inline-vocabulary obligation:model-fidelity
Difficulty 4/5 3-5 days Newbie friendliness 52/100
-
mechanism:licensed-emission obligation:idempotence
Difficulty 3/5 1-2 days Newbie friendliness 74/100
All issues in oxidecomputer/prettier-plugin-asciidoc
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·