diff --git a/ymd/main.py b/ymd/main.py index b6e0436..33d6d97 100644 --- a/ymd/main.py +++ b/ymd/main.py @@ -10,14 +10,14 @@ def parse_item(item, h): item_type = type(item) if item_type is list: if len(item) == 1: - return parse_item(item[0], h+1) + return parse_item(item[0], h + 1) if len(item) == 0: return '' - return parse_item('\n'.join(['- ' + str(sub_item) for sub_item in item]), h+1) + return parse_item('\n'.join(['- ' + str(sub_item) for sub_item in item]), h + 1) if item_type is dict: return { - "{1}".format(h, key): parse_item(value, h+1) for key, value in item.items() - } + "{1}".format(h, key): parse_item(value, h + 1) for key, value in item.items() + } if item_type in [int, float]: return item return markdown.markdown(str(item))