From: Christopher Bazin Date: Tue, 29 May 2018 04:07:53 +0000 (-0700) Subject: Enable line breaks in performatted text within rich text X-Git-Tag: live~2804 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/248f63f728295afcc6052f73f1a1617829a3ba90 Enable line breaks in performatted text within rich text This stops redaction details being truncated at the edge of the page when they have long lines of preformatted text. Also use a div instead of a paragraph for redaction details so that formatting is consistent with other rich text blocks. Closes #1885 Fixes #1845 --- diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 0314d7a7a..a16f7d85a 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -2314,6 +2314,7 @@ a.button { font-size: 13px; background: #e8e8e8; padding: 2px 3px; + white-space: pre-wrap; code { padding: 0; diff --git a/app/views/redactions/show.html.erb b/app/views/redactions/show.html.erb index 8ec72f3ac..36b454188 100644 --- a/app/views/redactions/show.html.erb +++ b/app/views/redactions/show.html.erb @@ -7,10 +7,10 @@ <%= t '.user' %> <%= link_to(@redaction.user.display_name, user_path(@redaction.user)) %>

-

+

<%= t '.description' %> <%= @redaction.description.to_html %> -

+
<% if current_user and current_user.moderator? %>