oxidecomputer / oxidecomputer/prettier-plugin-asciidoc

A trailing + and {plus} are two spellings of one rendered plus; the normal form is undecided

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

Nobody has claimed this yet.

conformance mechanism:inline-vocabulary obligation:confluence
Dominant language
TypeScript
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

What this is

* a\n +\n formats to * a {plus}\n: a bare + at an output line end would re-read as a hard break and backslash does not escape a + in Asciidoctor, so escapeDanglingPlus (src/print/reflow.ts, from #25, widened by #304) writes the attribute reference. The output is decided and permanent. The reparse ledger's plus-respelled family (7 rows) records the projection difference: text(value="a +") on one side, text(value="a ") attributeReference(name="plus") on the other. + and {plus} render identically, so this is a spelling pair on #217's axis list, and the rows expire once the pair is a declared normal form the projection carries.

The change

Decide the normal form (default: {plus} wherever a + would close an output line, + elsewhere), record it where #217's other axes are recorded, and teach the reparse projection that the pair is one spelling. Note for the implementer: no REPARSE_LENS row can carry this one as the lens is keyed <node type>.<field> and the difference is a text node against an attributeReference node.

Related

#217 (parent), #310, #304, #25.

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 with src/print/reflow.ts and the axis-recording work from #217, then inspect the reparse projection and its REPARSE_LENS keying. Decide and record the normal form for trailing + versus {plus}, and make the plus-respelled rows represent the pair as one spelling without using a REPARSE_LENS row.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
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.