Refactor section examples from classes to factory functions#8
Merged
andreisavu merged 1 commit intomainfrom Jan 27, 2026
Merged
Conversation
The code examples in sections 3, 4, and 4.1 showed sections as subclasses (e.g., class GameRulesSection) but the actual implementation uses factory functions (e.g., build_game_rules_section()). Updated the README to match the current implementation pattern. https://claude.ai/code/session_01EFFbwQAFBquperwEXsAmHd
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.
Summary
Updated README documentation examples to use factory functions instead of class-based approaches for creating
MarkdownSectioninstances. This simplifies the API and makes the examples more concise and easier to understand.Changes
MarkdownSectionto abuild_game_rules_section()factory functionMarkdownSectionto abuild_hints_section()factory functionMarkdownSectionto abuild_lucky_dice_section()factory functionDetails
All three examples now demonstrate direct instantiation of
MarkdownSection[EmptyParams]via factory functions rather than requiring users to create custom subclasses. This approach:https://claude.ai/code/session_01EFFbwQAFBquperwEXsAmHd