Skip to content

The grounding grammar admits an unknown container at column 0 #111

Description

@rookslog

The grounding grammar states four forms, and the second is any construct
written at column 0. ADR-0016 records it, and #69 inverted the continuation
path beside it, so a line indented under open prose now states what it may
begin with.

Form two is the remaining blanket admission. A line at column 0 is admitted
whatever it is, and the extractor reads a construct it does not model there as
prose, exactly as the continuation path did.

What reproduces

Each of these is verified against the branch that closed #69 and #70. The left
column is what micromark renders, so each row is a fact about a reader.

An unknown container under open prose:

Prose here.
<script>
Always preserve safety.
</script>

A reader sees a paragraph and then an HTML block. The extractor produces one
unit, Prose here. <script> Always preserve safety. </script>, and no refusal.
This is #69's own reproduction with the indent taken off.

The same shape after a blank line, which is form two with no prose open at all:

## Later

<div>
Always preserve safety.
</div>

One unit, no refusal. A reader sees an HTML block.

What closing it means

Ask which form the checker reads a column-0 line as, rather than adding a rule
that names <. ADR-0016 states the method and #37 carries the rounds that
forced it.

The work is larger than #69's, which is why it was deferred rather than folded
in. Form two governs EVERY line at column 0, not only the ones under open
prose, so inverting it has to admit each construct the walk genuinely reads
there: an ATX heading the section scan splits, a fence, a list item, a table,
an indented code block. A rule that only refused the continuation case would
leave Prose over <div> refused and Prose, a blank line, then <div>
admitted, which is incoherent to an author.

The shipped catalogue writes no such line, so a first version will pass the
checkAll test whatever it does. test/gfm-render.test.js holds the parser
oracle ADR-0029 added, and a fix here belongs under it.

Provenance

ADR-0029 names this as what its decision does not reach. The empty-marker case
came out of the lane that wrote it: - First. over - over an indented
directive rendered as two list items and reached one matrix row as the first
item's own words. That one IS fixed on the #69 branch, because it was a rule of
its own reading one flag for two states rather than form two's blanket. The two
HTML shapes above are not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    defectSomething behaves wronglyengineThe CLI, install, update, uninstall, doctor

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions