oxidecomputer / oxidecomputer/prettier-plugin-asciidoc
A bare URL is read with no left-boundary guard where the reference requires a line start, a blank or a bracket before the scheme
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
What happens
BARE_ADDRESS in src/parse/inline/rules.ts has no left-boundary guard. Ruby's InlineLinkRx (rx.rb l.526) requires (^|link:|blank|[>()\[\];"']) in front of the scheme; our rule matches anywhere, so xftp://e.com/a tokenizes as text plus a URL where the reference reads one plain text run. Byte-neutral today (the link node replays the author's bytes), so a tree divergence only; the #214 change widened the scheme list from two to five (https?, file, ftp, irc), which enlarged the surface. Sibling of the trailing-punctuation difference already commented in the same rule. Found by the #214 change (2026-09-06).
Fix shape
Add the left-boundary lookbehind to the rule and cite the line; measure the boundary class through both programs first (the bare-URL left boundary is a FREE slot in the whitespace battery, rx.rb l.526).
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 in src/parse/inline/rules.ts at BARE_ADDRESS, then compare the reference boundary in rx.rb line 526. Measure the left-boundary class through both programs using the whitespace battery, and verify that cases such as xftp://e.com/a remain one plain-text run while valid boundaries still tokenize as URLs.
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
- Mostly clear
- Newbie friendliness
- 74/100