Explicit list syntax (_ul / _ol); bare lists become paragraphs - #6
Merged
Conversation
Resolve the structural ambiguity where a YAML list under a heading meant either "several paragraphs" or "a bulleted list" depending on its contents. - A bare list is now always a sequence of content items: strings become paragraphs, mappings become subsections. It is never auto-bulleted. - Bullets and numbers are explicit: the new `_ul` and `_ol` constructs, intercepted structurally in build_story (not registry blocks) so they can compose with scoped text styles when those branches merge. - The implicit detections (list-of-strings -> bullets, integer-keyed mapping -> numbered list) are retired from dispatch; the check functions remain. - convert_ol accepts a list (positional numbering, nested lists nest) as well as a mapping (back-compat). This is a breaking content change (pre-1.0): existing documents relying on bare lists for bullets, or integer-keyed mappings for numbering, must adopt _ul / _ol. Migrates the test-data reports, all Examples, and the docs (document-structure, blocks reference); adds a design doc and tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves the structural ambiguity where a YAML list under a heading meant either "several paragraphs" or "a bulleted list" depending on its contents.
Changes
_ul/_olconstructs, intercepted structurally inbuild_story(not registry blocks) so they compose with scoped text styles when those branches merge.convert_olaccepts a list (positional numbering, nesting) as well as a mapping (back-compat).Breaking change
Pre-1.0 content break: documents relying on bare lists for bullets, or integer-keyed mappings for numbering, must adopt
_ul/_ol. Migrates the test-data reports, all Examples, and the docs.Testing
26 tests pass, incl. new
tests/test_explicit_lists.py. Rendered checks confirm bullets/numbers/nesting appear and that previously mis-bulleted prose now renders as paragraphs.Design doc:
design/explicit-list-syntax.md.Merge notes
Branched off
main. Recommended to merge beforefeatures/scoped-text-styles(per intended order). Overlaps with the scoped-text-styles branch instory_builder.py/content_converters.py; expect a conflict on whichever merges second — the design doc notes wherecurrent_stylethreads into the_ul/_olinterception.🤖 Generated with Claude Code