fixed bug that deleted words before empty lines

This commit is contained in:
jomo
2014-02-01 18:40:53 +01:00
parent 9b59749071
commit 60afa75b3f
4 changed files with 3 additions and 1285 deletions

View File

@@ -4,5 +4,5 @@
<div class="editlink"><%= link_to "edit", edit_blogpost_comment_path(c.blogpost, c) %></div>
<% end %>
</span>
<div class="comment-content"><%= h(c.content).gsub(/(\w*[\r\n]){3,}/, "\n\n").gsub("\n", "<br>").html_safe %></div>
<div class="comment-content"><%= h(c.content).gsub(/[\r\n]{3,}/, "\n\n").gsub("\n", "<br>").html_safe %></div>
</div>