Skip to content
Browse files

Summary won't cut off at the first very short paragraph

  • Loading branch information...
1 parent 230f173 commit f94422e11de5556f0ca75cdf24a1ff07764bde8e @SFEley SFEley committed
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/post.rb
View
10 lib/post.rb
@@ -30,17 +30,17 @@ def body_html
end
def summary
- summary, more = split_content(body)
- summary
+ @summary ||= body.match(/(.{200}.*?\n)/m)
+ @summary || body
end
def summary_html
- to_html(summary)
+ to_html(summary.to_s)
end
def more?
- summary, more = split_content(body)
- more
+ @more ||= body.match(/.{200}.*?\n(.*)/m)
+ @more
end
def linked_tags

0 comments on commit f94422e

Please sign in to comment.
Something went wrong with that request. Please try again.