Refactoring

Moved checking of whether a post is written in html or markdown into the Post class