Skip to content

fix(parser): count only top-level lists in list rules - #100

Merged
jackchuka merged 1 commit into
mainfrom
fix/nested-list-count
Nov 11, 2026
Merged

jackchuka merged 1 commit into
mainfrom
fix/nested-list-count

Conversation

@jackchuka

Copy link
Copy Markdown
Owner

Summary

Sub-lists nested under a list item were collected as separate lists, so a single list with a nested sub-list counted as two toward lists.min / lists.max. The parser now skips lists whose parent is a list item.

Fixes #91

Behavior change

Nested lists no longer count toward any lists rule. For example, a document that satisfied type: ordered, min: 1 only through an ordered list nested inside a bullet list will now report a violation. Worth a note in the release.

Test plan

Sub-lists nested under a list item were collected as separate lists,
so a single list with a nested sub-list counted as two toward
lists.min / lists.max. Skip lists whose parent is a list item.

Fixes #91

Claude-Session: https://claude.ai/code/session_014K1p9VkeotiX1SR8pLWJSK
@jackchuka
jackchuka marked this pull request as ready for review November 11, 2026 04:41
@jackchuka
jackchuka merged commit 8443857 into main Nov 11, 2026
1 check passed
@jackchuka
jackchuka deleted the fix/nested-list-count branch November 11, 2026 04:41
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.

Nested sub-lists are counted toward lists.min / lists.max

1 participant