oxidecomputer / oxidecomputer/prettier-plugin-asciidoc
span-marks identifies a hard break by comparing an atom's text to the printed image " +"
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Split from #325, row R3 (verified at main ffdc1860).
The question: is this atom a hard break?
The reader's answer: the node kind HardLineBreakNode (src/ast.ts), built in inline-link-builder.ts.
The second answerer: src/print/span-marks.ts l.78, inner.at(-1)?.text === HARD_BREAK_IMAGE, a comparison against the literal " +". Any other construct whose atom text is " +" answers the same. The one place that knows the atom is a break is where it is built in src/print/inline.ts, and nothing marks it there.
Closes when: the atom carries the kind it was built from (or the check reads the node) and the image comparison is deleted. Red-first pin: a text atom whose bytes are " +" but which is not a hard break (an escaped or passthrough plus at line end) beside a span mark.
Related: #325 (the catalog), #90 (the class), #323 (trailing + and {plus} spellings).
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 HardLineBreakNode definition in src/ast.ts, its construction in inline-link-builder.ts and src/print/inline.ts, then inspect the comparison at src/print/span-marks.ts line 78. Add a red-first case where a non-break text atom has bytes " +" at line end beside a span mark. Done means the atom carries or exposes its node kind and span-marks no longer relies on the literal image comparison.
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
- 78/100