From: Saman Bemel-Benrud <samanpwbb@gmail.com>
Date: Tue, 25 Jun 2013 21:03:51 +0000 (-0400)
Subject: Fix comment display in comment list view
X-Git-Tag: live~6238
X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/53fc883a91acf926d5102e6305ba87c30f5b30ab

Fix comment display in comment list view
---

diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss
index 5876c5db7..4fe477900 100644
--- a/app/assets/stylesheets/common.css.scss
+++ b/app/assets/stylesheets/common.css.scss
@@ -1361,6 +1361,11 @@ ul.results-list li { border-bottom: 1px solid #ccc; }
   tr th {
     padding: $lineheight/4;
   }
+  p:last-child,
+  h2:last-child,
+  h3:last-child {
+    margin-bottom:0;
+  }
   tr td {
     height: 30px;
     border-right: 1px solid $keyline;
diff --git a/app/views/diary_entry/comments.html.erb b/app/views/diary_entry/comments.html.erb
index 971993a9b..fd90b7501 100644
--- a/app/views/diary_entry/comments.html.erb
+++ b/app/views/diary_entry/comments.html.erb
@@ -13,7 +13,7 @@
   <tr class="<%= cl %>">
     <td width="25%"><%= link_to comment.diary_entry.title, :action => :view, :display_name => comment.diary_entry.user.display_name, :id => comment.diary_entry.id %></td>
     <td width="25%"><span title="<%= l comment.created_at, :format => :friendly %>"><%= t 'diary_entry.comments.ago', :ago => time_ago_in_words(comment.created_at) %></span></td>
-    <td width="50%" class="richtext"><%= comment.body %></td>
+    <td width="50%" class="richtext"><%= comment.body.to_html %></td>
   </tr>
   <% end -%>
 </table>