Merge lp:~evfool/software-center/lp983831 into lp:software-center/5.2
Proposed by
Robert Roth
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | 3028 | ||||
Proposed branch: | lp:~evfool/software-center/lp983831 | ||||
Merge into: | lp: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:~evfool/software-center/lp983831 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Vogt | Approve | ||
Review via email: mp+106754@code.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.
Thanks for your work on this branch! This looks great! I tweaked it a tiny bit to provide a:
+ def maybe_add_ space(prefix) : endswith( "\n") or prefix.endswith(" ")):
+ if not (prefix.
+ 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).