Skip to content
Permalink
Browse files

Fixing 'Click to read' feature

  • Loading branch information...
Depado committed Sep 23, 2015
1 parent 3c2b28e commit a0896fd17cb9267cfec442c32ee369b79a94118a
Showing with 3 additions and 3 deletions.
  1. +2 −2 app/models/post.py
  2. +1 −1 app/templates/helpers.html
@@ -51,8 +51,8 @@ def delete(self):
return False
return True

def content_as_html(self):
if self.user.blog_truncate_posts:
def content_as_html(self, index=False):
if self.user.blog_truncate_posts and index:
content = markdown_renderer.render(self.content)
try:
truncated = content[:300 + content[300:].index(" ")]
@@ -65,7 +65,7 @@
</div>
<div class="panel-body" id="post-{{ post.id }}">
<div id="post-parsed-{{ post.id }}">
{{ post.content_as_html() | safe }}
{{ post.content_as_html(index) | safe }}
</div>
<div id="post-raw-{{ post.id }}" style="display: none;">
<pre>{{ post.content }}</pre>

0 comments on commit a0896fd

Please sign in to comment.
You can’t perform that action at this time.