oxidecomputer / oxidecomputer/prettier-plugin-asciidoc

A [*] checkbox the reader refuses loses the checklist reading and moves a bold run

Open
#326 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

What happens

* [*] a
 +
para
  *b
  c* d

Both programs render <p>&#10003; a <br> para <strong>b c</strong> d</p>. The formatter writes * [*]\na\n +\npara *b c* d\n, which both programs render <p>[<strong>] a <br> para *b c</strong> d</p>: the checklist reading is gone and the bold run has moved.

A second face of the same cluster: * [*] a\n +\n// c\n *b\n c* d\n formats to * [*] a +\n// c\n*b c* d\n; the item stays a checklist, but the literal + becomes a <br> (#304's common-indent mechanism reappearing because the refused prefix leaves four extra columns inside the text).

Mechanism

stripCheckboxPrefix (src/parse/build/list.ts) refuses the prefix when the leading text node does not carry all four characters, which happens to [*] whenever the item's text holds a later * for the checked marker's own * to pair with. The comment at the refusal calls this "a divergence in the one direction that cannot corrupt text"; these documents are counterexamples under both programs.

How it was found

The #314 population (a checklist first-line dimension of the reflow-line sweep, 16,723 added documents): one cluster of three documents, indented-two-line/fidelity, tagged with this issue.

Related

#314, #304, #316, #140.

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 in src/parse/build/list.ts at stripCheckboxPrefix and reproduce the three documents in the #314 population, especially indented-two-line/fidelity. Compare the formatter output with the two reference renderings, then add coverage showing that the checklist reading, bold span, and literal + remain unchanged.

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
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.