oxidecomputer / oxidecomputer/prettier-plugin-asciidoc
A constrained bold span closing beside a pass:[] macro is refused because the boundary test reads the unmasked text
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
What happens
A constrained bold span whose closing mark abuts a pass:[] macro is not read as a span:
| text | ours | Ruby 2.0.26 and @asciidoctor/core 4.0.11 (agree) |
|---|---|---|
x *a*pass:[b] c |
no span | <strong>a</strong>b |
Bytes round-trip; the divergence is parse-side (a tree pin, not a format pin). The sibling kinds are already right: _a_pass:[b], `a`pass:[b], #a#pass:[b] and "`a`"pass:[b] all build their span (measured in the #194 change, whose passthrough mask reached them).
Where it is decided
canOpenAt / canCloseAt in src/parse/inline/quote-boundaries.ts (around l.465 and l.503) choose source = seesCurvedRewrite(kind) ? view : text. Every kind but bold reads curved.view, which since #194 is derived from the passthrough-masked text; bold's unconstrained row sorts ahead of the curved rows in QUOTE_SUBS, so seesCurvedRewrite("bold") is false and bold reads the raw fragment, where the p of pass: is a word character that refuses the closing boundary. The Ruby sees a non-word placeholder there (extract_passthroughs runs before the quote pass, substitutors.rb). The inner non-space test at l.455 and l.499 reads the raw fragment for every kind and has the same gap.
Fix shape
Carry the passthrough-masked fragment through the window the way curved.view is carried, and read it in both boundary tests: a masked-fragment field on InlineScan in src/parse/inline/quote-pass.ts (clipped in windowOf), handed down by markFlags in src/parse/inline/rules.ts, read by both boundary functions in quote-boundaries.ts. Tree-only, byte-safe, the same class as #194. Found by the #194 review (2026-09-06).
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 boundary tests in src/parse/inline/quote-boundaries.ts and trace InlineScan through windowOf in src/parse/inline/quote-pass.ts and markFlags in src/parse/inline/rules.ts; compare the passthrough handling from #194. Verify that x apass:[b] c produces a bold span while the existing sibling cases and byte output remain unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100