Switch to hashmark Markdown headers on export

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

View file

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