diff --git a/ponysay-tool.py b/ponysay-tool.py index c08a8535..b7e3f444 100755 --- a/ponysay-tool.py +++ b/ponysay-tool.py @@ -329,7 +329,7 @@ class PonysayTool(): test = key for c in 'ABCDEFGHIJKLMN OPQRSTUVWXYZ': test = test.replace(c, '') - if len(test) == 0: + if (len(test) == 0) and (len(key.replace(' ', '')) > 0): key = key.strip(' ') value = line.replace('\t', ' ') value = value[value.find(': ') + 2:] diff --git a/ponysay.py b/ponysay.py index fff42dc0..cc2de9e5 100755 --- a/ponysay.py +++ b/ponysay.py @@ -1860,7 +1860,7 @@ class Backend(): test = key for c in 'ABCDEFGHIJKLMN OPQRSTUVWXYZ': test = test.replace(c, '') - if len(test) == 0: + if (len(test) == 0) and (len(key.replace(' ', '')) > 0): value = line[sep + 1:].strip() line = '\033[1m%s\033[21m: %s\n' % (key.strip(), value) tags += line