Commit 86eb39da authored by Bram Schoenmakers's avatar Bram Schoenmakers

Show items without priority in console

When topydo is run with colors, items without priority get an invalid
markup added. Only add markup when an item has actually a priority.

Bug found and fixed by @mruwek
parent 13d2a633
...@@ -66,6 +66,8 @@ def topydostringToMarkup(p_string): ...@@ -66,6 +66,8 @@ def topydostringToMarkup(p_string):
# markup # markup
if color_at_start and isinstance(p_string.metadata, Todo): if color_at_start and isinstance(p_string.metadata, Todo):
priority = p_string.metadata.priority() priority = p_string.metadata.priority()
if priority:
markup = ('pri_' + priority, markup) markup = ('pri_' + priority, markup)
return markup return markup
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment