clartaq / cwiki

A personal wiki written in Clojure/Script
Other
3 stars 0 forks source link

Extra Blank Lines Added to Top of Markdown Files #20

Closed clartaq closed 4 years ago

clartaq commented 4 years ago

Somewhere in the edit/export/delete/import cycle, extra lines are being inserted at the top of the Markdown of the pages.

clartaq commented 4 years ago

When files are exported, a line is added between the end of the front matter and the beginning of the Markdown. It makes the file look nicer when using another Markdown editor on the file.

Over multiple exports and imports, the number of blank lines increases.

To fix it, the body (Markdown) of the page is trimmed when it is loaded from a file. Thus, the exported files still look nice in other editors and there is no "buildup" of blank lines in the CWiki editor.