mirror of
https://github.com/erkin/ponysay.git
synced 2024-11-28 23:17:59 +01:00
fix metadata tag removal bug
Signed-off-by: Mattias Andrée <maandree@operamail.com>
This commit is contained in:
parent
c53bf606b3
commit
eea422233e
1 changed files with 4 additions and 0 deletions
|
@ -763,6 +763,8 @@ class PonysayTool():
|
||||||
keys = [key for key in data]
|
keys = [key for key in data]
|
||||||
keys.sort()
|
keys.sort()
|
||||||
for key in keys:
|
for key in keys:
|
||||||
|
if self.data[key] is None:
|
||||||
|
continue
|
||||||
if (key == 'comment') or (len(self.data[key].strip()) == 0):
|
if (key == 'comment') or (len(self.data[key].strip()) == 0):
|
||||||
continue
|
continue
|
||||||
values = self.data[key].strip()
|
values = self.data[key].strip()
|
||||||
|
@ -949,6 +951,8 @@ class TextArea: # TODO support small screens
|
||||||
current = leftlines[row]
|
current = leftlines[row]
|
||||||
if len(datalines[row].strip()) == 0:
|
if len(datalines[row].strip()) == 0:
|
||||||
if current is not 'comment':
|
if current is not 'comment':
|
||||||
|
if current != last:
|
||||||
|
self.datamap[current] = None
|
||||||
continue
|
continue
|
||||||
if current == last:
|
if current == last:
|
||||||
self.datamap[current] += '\n' + datalines[row]
|
self.datamap[current] += '\n' + datalines[row]
|
||||||
|
|
Loading…
Reference in a new issue