Repository navigation
Compose blank lines in descriptions with no indent - #196
Merged
Merged
Conversation
Google, Numpydoc and Epydoc compose joined an item's description lines with the indent, so a blank line inside it came out as spaces alone. Indent only the lines that have text, through one shared helper. ReST already wrote them empty. A new invariant checks that no case input composes, in any style or rendering, to a line of spaces alone. Closes #61.
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.
Compose a blank line inside an item's description as an empty line, not as a line of indent spaces, so that
compose(parse(text))gives back the text of #61 exactly and composed docstrings have no trailing whitespace.hang()in_compose.py, which indents only the lines that have text. ReST already wrote blank lines empty, and the other places that indent text (sections, directives, attribute bodies) already skipped them.test_invariants.pygetstest_compose_writes_no_blank_line_with_indent: every case input whose own blank lines are empty composes, in every style and rendering, with no line of spaces alone. It fails on main for Google, Numpydoc and Epydoc.test_google.pyadds the example from newlines not preserved in google param description #61.just update-casesrewrote 54 case files; all 123 changed lines are compose output where a line of spaces became an empty line.Closes #61.