oxidecomputer / oxidecomputer/prettier-plugin-asciidoc

A newline-bearing run beside a lone -- manufactures an em dash through reflow

Open
#148 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

mechanism:reflow-join obligation:meaning-preservation tier-1
Dominant language
TypeScript
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Found during #145: See a\n\t-- b now. renders literal -- at input and an em dash after formatting, at base and after the #145 fix alike. runKeepsItsBytes refuses to fuse a newline-bearing run (an atom is newline-free by construction), so the tab survives nowhere and the join writes a space on both sides of the dashes. The remedy is a break the printer HOLDS (the newline was itself the refusing boundary), not bytes inside a word - the same vocabulary as the #139 held break, one mechanism over. The #145 edge path has the same gap for an edge run carrying a line break.

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

Start by reading the behavior described in #145 and the held-break mechanism from #139, then trace the printer path involving runKeepsItsBytes and edge runs. Done means a newline-bearing run beside a lone -- preserves the intended break and avoids manufacturing an em dash, including the edge-run case.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.