oxidecomputer / oxidecomputer/prettier-plugin-asciidoc
Investigate honoring proseWrap, and whether wrap-refusal tokenization can shrink the hazard surface
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Prettier's markdown plugin defaults to proseWrap preserve because rewrapping prose in markup is semantic; we reflow unconditionally because our admissibility machinery is what makes reflow safe. Two questions worth a bounded investigation:
-
Can we honor proseWrap as users expect (preserve = keep the author's breaks, never = join to one line, always = today's behavior) without a new hazard class? preserve and never both look easier than always: preserve keeps the source partition (always admissible by the AST invariants), and never is a single join whose seams are the only hazards.
-
Does thinking of hazardous shapes as unwrappable TOKENS reduce complexity? A continuation plus, a bare attribute-reference line, a callout marker: if the atom stream glued these to their neighbours up front (noBreakBefore/noBreakAfter at atom construction), some emission-time checks might become unnecessary because the packer could never produce the hazardous line in the first place. This overlaps with the constraint-query architecture work; the investigation should measure whether token-level gluing deletes checks or merely relocates them.
Expected outcome is a short written answer with measurements, not necessarily code. Low expectation of large wins; worth knowing.
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
Trace the existing proseWrap handling, atom construction, emission-time hazard checks, and constraint-query architecture. Measure whether preserve, never, and always can be supported safely, and whether token-level gluing removes checks or only relocates them; document the findings and measurements as the done condition.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100