Preprocessor lines put a case's oracle parse out of reach of the table structure comparison

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

Nobody has claimed this yet.

Assessment

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

Research direction

Start with tests/parser/table-structure.test.ts and inspect the two vendored corpus cases in the "preprocessor" exclusion family. Read docs/coding-standards.md and issue #107 to understand the existing divergence policy. Done means either implementing the deliberate preprocessor-resolution feature or documenting unresolved directives as out of scope and updating the exclusion reason to reference issue #131.

Written by the indexing model from the issue text.

Description

conformance mechanism:block-reading obligation:model-fidelity

Two vendored corpus cases are excluded from the table structure
comparison (tests/parser/table-structure.test.ts, exclusion family
"preprocessor") because a preprocessor line anywhere in the case makes
the oracle's parse diverge from ours before any table machinery runs:
Asciidoctor resolves include:: and conditional directives in its reader,
while our parser records them as preprocessorDirective lines and reads
the document as written. In one of the two cases the include:: IS the
table body (a TSV include), so the oracle's table has rows ours cannot
see.

This is the same standing divergence #107 records for description lists:
no fix inside a single construct's reader is correct in isolation, and
the honest state is an exclusion naming this issue.

The exclusion reason currently cites issue #10; when #10 closes it
should point here instead.

What closing this would take

Either resolving preprocessor directives (a large, deliberate feature
with its own safety story), or deciding permanently that unresolved
directives are out of scope and recording that in
docs/coding-standards.md's divergence list, at which point the
exclusions become permanent by design and this issue closes with that
record.

Dominant language
TypeScript
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

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.

More from oxidecomputer/prettier-plugin-asciidoc

All issues in oxidecomputer/prettier-plugin-asciidoc

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.