Repository navigation
Support wrapping inline-only list items - #297
Open
xiangnuans wants to merge 1 commit into
Open
xiangnuans wants to merge 1 commit into
xiangnuans wants to merge 1 commit into
Conversation
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.
Refs #78.
With
wrap=True, a plain<li>currently stays on one line while the same content inside<li><p>…</p></li>wraps. This applies the existing paragraph wrapping logic to inline-only list items, keeping the current continuation indentation for ordered and unordered lists.wrap_widthremains the content width, before list markers and indentation.Items containing block descendants retain their existing layout; inline-only leaves of nested lists can wrap. This is a limited improvement for #78, not full reflow of mixed block/inline list content. The default
wrap=Falsebehavior is unchanged.Validation: the three new regression tests fail against the unchanged baseline and pass with the fix.
tox -e py312passes all 86 tests, flake8, and README RST lint. Tests cover ordered/unordered indentation, inline emphasis, both hard-break styles, nested lists, block-layout preservation, andwrap_width=None.AI disclosure: OpenAI Codex assisted with investigation, implementation, tests, and this description; a separate AI-assisted review checked the changes. All reported checks were run locally. No human review is claimed.