def html(self): """ Html repr if file exists or None """ # check if file exists if not self.content: return None # translate Markdown to HTML return render_markdown(self.content)
def render(): """ Render markdown """ content = request.form.get('content', '') return jsonify(value=render_markdown(content))