A list item carrying an own-line hard break is written at column 0, so its continuation indent is lost
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- ruby, typescript
- Domain
- tooling
Research direction
Read parser.rb lines 2721-2733 and the context from #304, then review related issues #301 and #307. Compare the affected reparse-ledger and inline-sweep idempotency witnesses; done means a maintainer rules whether column 0 is the accepted normal form and records the family's disposition.
Written by the indexing model from the issue text.
Description
What happens
After #304, an item whose text holds a line that is only + (a hard break on its own line) is written with all of its text lines at column 0 instead of under the marker text:
* a
b +
+
c
formats to * a\nb +\n +\nc\n. Render-equal in both programs and a fixed point; the source's continuation indent is gone. The reparse ledger records the 14 rows under the family indent-dropped-for-a-break, standing open on this issue.
Why
Ruby's adjust_indentation! (parser.rb l.2721-2733) strips the least indent from an indented item body before HardLineBreakRx reads a line. The break's line is written as the bare two-byte image; if the item's other lines stand under the marker text, that line is the least indented one and the strip eats the space that spells the break. One line at column 0 cancels the strip for the whole item, which is what the column-0 spelling buys.
The alternative, measured (Sep 7, the #304 lane)
Keep the item's text at the marker column and write the break's line one column past it. For an item's own lines that round-trips every witness. But the indent is then copied into a byte-preserved span's interior (a monospace span or passthrough spanning the break), which grows on every pass: 2, 4, 6 columns. Cost: 63 inline-sweep HardLineBreak/in-mono/idempotency rows (7 failing to 70) and the reparse population 121 to 182 breaches, 99 unclassified. Column 0 is the cheaper loss.
Ruling requested
Whether a list item's continuation indent is worth preserving at that price, or whether the column-0 spelling is the accepted normal form for an item carrying an own-line break (in which case this family's standing becomes a ruled loss and the rows do not expire). Default unless vetoed: column 0 is the normal form.
Related
#304, #301, #307.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
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.
More from oxidecomputer/prettier-plugin-asciidoc
-
mechanism:instrument
Difficulty 1/5 Under an hour Newbie friendliness 88/100
oxidecomputer/prettier-plugin-asciidoc#193 · 2 comments ·
-
conformance mechanism:block-reading obligation:meaning-preservation tier-1
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
An indented setext title under a substituting directive opens a literal block and loses the section Openconformance mechanism:block-reading obligation:meaning-preservation tier-1
Difficulty 4/5 3-5 days Newbie friendliness 68/100
-
mechanism:inline-vocabulary obligation:model-fidelity
Difficulty 4/5 3-5 days Newbie friendliness 52/100
-
mechanism:licensed-emission obligation:idempotence
Difficulty 3/5 1-2 days Newbie friendliness 74/100
All issues in oxidecomputer/prettier-plugin-asciidoc
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·