Switch to hashmark Markdown headers on export

Closes #487
This commit is contained in:
MinchinWeb 2017-11-13 18:04:24 -07:00
parent ea8f555ec9
commit fafcd23e08

View file

@ -68,12 +68,10 @@ class MarkdownExporter(TextExporter):
for e in journal.entries:
if not e.date.year == year:
year = e.date.year
out.append(str(year))
out.append("=" * len(str(year)) + "\n")
out.append("# " + str(year))
if not e.date.month == month:
month = e.date.month
out.append(e.date.strftime("%B"))
out.append('-' * len(e.date.strftime("%B")) + "\n")
out.append("## " + e.date.strftime("%B"))
out.append(cls.export_entry(e, False))
result = "\n".join(out)
return result