mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-12-18 00:18:28 +02:00
only add description if it exists
This commit is contained in:
@@ -229,6 +229,7 @@ def parse(data, raw=False, quiet=False):
|
|||||||
|
|
||||||
if this_entry != last_entry:
|
if this_entry != last_entry:
|
||||||
if entry_obj:
|
if entry_obj:
|
||||||
|
if description:
|
||||||
entry_obj['description'] = ' '.join(description)
|
entry_obj['description'] = ' '.join(description)
|
||||||
raw_output.append(entry_obj)
|
raw_output.append(entry_obj)
|
||||||
entry_obj = {}
|
entry_obj = {}
|
||||||
@@ -246,6 +247,8 @@ def parse(data, raw=False, quiet=False):
|
|||||||
if desc_entry:
|
if desc_entry:
|
||||||
description.append(line)
|
description.append(line)
|
||||||
|
|
||||||
|
if entry_obj:
|
||||||
|
if description:
|
||||||
entry_obj['description'] = ' '.join(description)
|
entry_obj['description'] = ' '.join(description)
|
||||||
raw_output.append(entry_obj)
|
raw_output.append(entry_obj)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user