diff options
-rw-r--r-- | CHANGES | 7 | ||||
-rw-r--r-- | layman/overlays/overlay.py | 5 |
2 files changed, 8 insertions, 4 deletions
@@ -8,9 +8,10 @@ Version TODO On addition all sources will be probed until a working one is found. This should help Layman through many firewalls. - - Include more information in overlay info display (i.e. layman -i): - - quality indicator (not guarantee) - - feed URIs + - Improve overlay info display (i.e. layman -i): + - Add quality indicator (not guarantee) + - Add feed URIs + - Fix whitspace handling for description field - Improve usage display diff --git a/layman/overlays/overlay.py b/layman/overlays/overlay.py index 179123c..ddb118e 100644 --- a/layman/overlays/overlay.py +++ b/layman/overlays/overlay.py @@ -65,6 +65,7 @@ OVERLAY_TYPES = dict((e.type_key, e) for e in ( QUALITY_LEVELS = 'core|stable|testing|experimental|graveyard'.split('|') +WHITESPACE_REGEX = re.compile('\s+') #=============================================================================== # @@ -162,7 +163,9 @@ class Overlay(object): _desc = xml.find('description') if _desc != None: - self.description = ensure_unicode(_desc.text.strip()) + d = WHITESPACE_REGEX.sub(' ', _desc.text.strip()) + self.description = ensure_unicode(d) + del d else: self.description = '' if not ignore: |