oxidecomputer / oxidecomputer/prettier-plugin-asciidoc

Investigate honoring proseWrap, and whether wrap-refusal tokenization can shrink the hazard surface

Open
#176 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

mechanism:reflow-join obligation:meaning-preservation tier-2
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:

  1. 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.

  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.