oxidecomputer / oxidecomputer/prettier-plugin-asciidoc

A setext title's leading space is dropped when an indented line doubles as title text

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

Nobody has claimed this yet.

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

Description

Tier 1 (formatting corrupts output). Found by a fresh triage of the
realization-dependent pair-grid keys against current main; 6 of the 144
keys the triage covers.

Mechanism

An indented line ( lit, + x) immediately followed by a real delimited
block is read by Asciidoctor as a two-line SETEXT title: the delimiter's own
opening line doubles as the title's underline (----/~~~~/++++ map to
different heading levels), and the indented line's leading space is part of
the TITLE TEXT itself, not insignificant indentation. The formatter strips
that leading space when it reprints the line, so the rendered heading text
loses its leading space.

This is the render-UNEQUAL sibling of the same mechanism reopened issue #121
tracks (a line's leading indentation is dropped and the de-indented line
reads differently): #121's own fix did not touch this face either, since it
fixed only nested list-marker indentation.

Repro

input:
  lit
----
foo
----

our output:
== lit

== foo

render(input):  <h2 id="_lit"> lit</h2>
render(output): <h2 id="_lit">lit</h2>

The heading text itself changes (a leading space is silently dropped from
what the oracle reads as literal title content).

Measured extent

6 keys: pair/indented-continuation/delimiter-listing/adjacent,
pair/indented-continuation/delimiter-openBlockTilde/adjacent,
pair/indented-continuation/delimiter-pass/adjacent,
pair/indented-line/delimiter-listing/adjacent,
pair/indented-line/delimiter-openBlockTilde/adjacent,
pair/indented-line/delimiter-pass/adjacent. All verdict: fidelity.

Commit measured on

Original measurement: main 2a139d6f. Re-verified before filing on main
8a3abeb2f2ff (2026-09-05), realizations
pair/indented-continuation-near-0/delimiter-listing/adjacent/doc
(input + x\n----\nfoo\n----\n) and
pair/indented-line/delimiter-listing/adjacent/doc
(input lit\n----\nfoo\n----\n) - both still fail fidelity identically to
the repro above.

Provenance

Measured in dependent-keys-triage.md (the "DEINDENT-STEALS-TITLE-SPACE"
group of a realization-dependent pair-grid key triage).

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 by reproducing the issue with the input shown and compare render(input) with render(output). Read the DEINDENT-STEALS-TITLE-SPACE group in dependent-keys-triage.md and verify the six listed realization-dependent keys; done means their rendered heading text preserves the leading space and matches the expected fidelity.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.