Skip to content

fix(lint): read numbered level-two headings as register entries - #82

Merged
attila merged 6 commits into
mainfrom
fix/heading-register-entries
Nov 4, 2026
Merged

attila merged 6 commits into
mainfrom
fix/heading-register-entries

Conversation

@attila

@attila attila commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Read a binding artefact's ## N. Title headings as its entries. A register kept in that form read as holding no entry, so its conversion to a numbered list went unchecked, and a numbered list at the left margin inside an entry read as entries of its own and blocked the conversion.

A level-two heading at the top level of the body whose text opens with a number, a full stop and white space is now an entry, running to the next top-level heading of level one or two, a thematic break or the end of the body. Where a version holds a heading entry, no numbered list item in it is an entry, so a list-form register that also holds a top-level numbered ## section heading now reads in heading form and fails loudly on commit.

List entries also follow CommonMark once their item has closed. A heading, thematic break or numbered item indented up to three spaces after it ends the entry, and a numbered line that continues a top-level paragraph is no longer an entry, so a register written that way fails loudly on its next commit. Lists nested in an entry, indented code and fences are read as CommonMark reads them too, so an unindented line after indented code in an item no longer keeps the item open. A supersession mark or legacy note inside an indented code block no longer counts, as one inside a fenced block already did not.

The supersession-marks fixtures move to the proposal's commit that defines heading entries and gives each rule its own clause, and the suite cites the new clause numbers. That commit is still under review in aw-tools/agentic-workspace#28, and the pin moves to its merged commit before this lands.

A register written as `## N. Title` headings read as holding no entry,
so converting it to a numbered list was not checked entry for entry,
and a numbered list at the left margin inside one of its entries read
as entries of its own and blocked the conversion. A level-two heading
at the top level of the body whose text opens with a number, a full
stop and white space is now an entry, as the supersession-marks
proposal states. Where a version holds a heading entry, no numbered
list item in it is an entry.

The proposal's fixtures are updated to its current commit.
A list item closes before its entry ends when an unindented paragraph
follows a blank line, yet the parser kept reading later lines indented
by one to three spaces as inside the item, so a heading, thematic break,
numbered item or fence there was swallowed into the entry. The reader
now tracks the item's open state apart from the entry's, and whether the
open paragraph sits at the top level, so that only a non-empty item
numbered 1 may interrupt such a paragraph while any item may open where
a line falls out of a list or block quote.
Lines inside a list nested in an entry were judged against the entry's own
item, so indented code there read as a paragraph and took lazy lines, and an
unindented line after it kept the item open. A numbered line that followed
could then open an entry CommonMark does not have.

Track the content columns of nested list items and judge laziness, indented
code, block starts and fence openers against the innermost one. A fence opens
on a list item's first line and closes with the item it sits in; an opener
indented four or more columns past its container, a thematic break of bullet
characters and an empty `*` or `+` continuing a top-level paragraph open
nothing.
The supersession-marks proposal now gives each rule its own clause, and
adds a fixture for the warning on a format change of an artefact with
no entry. Copy its fixtures and pin them, cite the new clause numbers,
and require each warning rule to fire on a fixture under its clause.
The proposal says a supersession mark or legacy note does not count inside
a code block, and aw hid them only in code spans and fenced blocks. Lines
in an indented code block inside an entry now hide them too, keeping their
words.

Reading which lines are indented code also corrects three paragraph-state
errors: a lazy setext underline no longer closes the paragraph, an empty
item line leaves no open paragraph, and an empty bullet closes at the next
blank line.
Describe word-change groups and clause 3.10's kept names as the proposal
now words them, without the supersedes and superseded-by sets it no longer
defines.
@attila
attila marked this pull request as ready for review November 3, 2026 18:14
@attila
attila merged commit c560d07 into main Nov 4, 2026
20 checks passed
@attila
attila deleted the fix/heading-register-entries branch November 4, 2026 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant