From 29825d805baa443caf32cb452f7a4bba69ad4950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Pi=C4=8Dman?= Date: Mon, 13 May 2019 15:19:35 +0200 Subject: [PATCH] Description field trunkates on blank line. #1008 --- app/views/dmsf_files/show.html.erb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/views/dmsf_files/show.html.erb b/app/views/dmsf_files/show.html.erb index e2ee93cd..c4becc54 100644 --- a/app/views/dmsf_files/show.html.erb +++ b/app/views/dmsf_files/show.html.erb @@ -113,9 +113,11 @@
<%= content_tag :div, l(:label_description), :class => 'label' %> <% text = textilizable(revision.description) %> - <% if text =~ /^

(.*)<\/p>$/ %> - <% text = $1 %> - <% end %> + <%# If there is

tag, the text is moved one column to the right by Redmin's CSS. A new line causes double new line. %> + <% text.gsub! '

', '' %> + <% text.gsub! '

', '' %> + <% text.gsub! "\n\n", '
' %> + <% text.gsub! "\n\t", '
' %> <%= content_tag :div, text.html_safe, :class => 'value wiki' %>
<% end %>