oxidecomputer / oxidecomputer/prettier-plugin-asciidoc

A discrete or float setext heading inside a container is folded into a paragraph

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

Nobody has claimed this yet.

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

====
[discrete]
TTT
---
para
====

Both programs render <h2 class="discrete">TTT</h2> plus a paragraph. The formatter writes ====\n[discrete]\nTTT --- para\n====, one paragraph. Same for [float]. Found by the #315 lane (Sep 7), which fixed the atx spelling only.

Mechanism

blockStartContextIn (src/parse/lines/scope.ts) withholds nextLine from every confined reader, so a setext title is never classified inside a container. That is right for a plain TTT\n---\npara inside a container (one paragraph to both programs, must stay folded) and wrong when a discrete or float style is held. Fixing it needs the classifier to know a style is held, which it cannot today: a design change, not a reorder.

Related

#315 (the atx spelling, fixed), #293, #306.

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 reading blockStartContextIn in src/parse/lines/scope.ts and the related context from issues #315, #293, and #306. The design should preserve discrete and float setext headings inside containers while keeping plain setext text folded into a paragraph, with the formatter producing equivalent output.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.