Merge lp://staging/~evfool/software-center/lp983831 into lp://staging/software-center/5.2

Proposed by Robert Roth
Status: Merged
Merged at revision: 3028
Proposed branch: lp://staging/~evfool/software-center/lp983831
Merge into: lp://staging/software-center/5.2
Diff against target: 37 lines (+16/-0)
2 files modified
softwarecenter/utils.py (+2/-0)
test/test_description_norm.py (+14/-0)
To merge this branch: bzr merge lp://staging/~evfool/software-center/lp983831
Reviewer Review Type Date Requested Status
Michael Vogt (community) Approve
Review via email: mp+106754@code.staging.launchpad.net

Description of the change

Normalizing package descriptions had an issue with merging the last line's first word and the previous line's last word in some cases. Fixed the behaviour and added a testcase to avoid regressing.

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your work on this branch! This looks great! I tweaked it a tiny bit to provide a:

+ def maybe_add_space(prefix):
+ if not (prefix.endswith("\n") or prefix.endswith(" ")):
+ return " "
+ else:
+ return ""

So that the logic is in a single place and we could use string.whitespace here too.
Please remerge and tell me what you think :) But it should be equivalent to your fix
(which was fine already, this is really nitpicking).

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches