|
|
|
@ -6,6 +6,7 @@ from __future__ import unicode_literals |
|
|
|
|
from flask import Blueprint, g, request, redirect, url_for, flash, make_response |
|
|
|
|
import datetime |
|
|
|
|
import time |
|
|
|
|
import re |
|
|
|
|
from xml.dom.minidom import Document |
|
|
|
|
|
|
|
|
|
import rophako.model.user as User |
|
|
|
@ -89,6 +90,10 @@ def entry(fid): |
|
|
|
|
post = Blog.get_entry(post_id) |
|
|
|
|
post["post_id"] = post_id |
|
|
|
|
|
|
|
|
|
# Body has a snipped section? |
|
|
|
|
if "<snip>" in post["body"]: |
|
|
|
|
post["body"] = re.sub(r'\s*<snip>\s*', '\n\n', post["body"]) |
|
|
|
|
|
|
|
|
|
# Render the body. |
|
|
|
|
if post["format"] == "markdown": |
|
|
|
|
post["rendered_body"] = render_markdown(post["body"]) |
|
|
|
@ -456,6 +461,11 @@ def partial_index(): |
|
|
|
|
|
|
|
|
|
post["post_id"] = post_id |
|
|
|
|
|
|
|
|
|
# Body has a snipped section? |
|
|
|
|
if "<snip>" in post["body"]: |
|
|
|
|
post["body"] = post["body"].split("<snip>")[0] |
|
|
|
|
post["snipped"] = True |
|
|
|
|
|
|
|
|
|
# Render the body. |
|
|
|
|
if post["format"] == "markdown": |
|
|
|
|
post["rendered_body"] = render_markdown(post["body"]) |
|
|
|
|