Repository navigation
Keep a multi-sentence summary intact when it is followed by a description - #397
Closed
kritagyadubey wants to merge 1 commit into
Closed
kritagyadubey wants to merge 1 commit into
kritagyadubey wants to merge 1 commit into
Conversation
do_split_summary() merged the remainder of a multi-sentence summary into the line that followed it, overwriting the blank line that separates the summary from the description. With no blank line left, the wrapped summary and the description then ran together on a single line. Insert the remainder directly after the first sentence instead, which keeps the blank separator in place. Fixes #315
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.
When a summary has more than one sentence and is followed by a description,
do_split_summarysplits at the first period but then places the rest of thesummary in the wrong position. On master this mangles the docstring: a blank line
ends up between the first and second sentence, and the description is appended to
the end of the summary with extra spaces.
Given:
master produces:
The rest of a multi-sentence summary still belongs to the summary, so this inserts
it directly after the first sentence and leaves the blank line where it separates
the summary from the description:
This adds unit tests for
do_split_summary(single-line and two-line summaries)and an end-to-end case in
do_format_code.toml. Both fail on master and passwith the change.
The original report in #315 showed the summary lines reordered. That exact
reordering no longer occurs after later refactors, but the summary/description
boundary is still mangled on master, so the issue remains open.
Fixes #315