diff --git a/app/helpers/text_helper.rb b/app/helpers/text_helper.rb new file mode 100644 index 000000000..dda3ba721 --- /dev/null +++ b/app/helpers/text_helper.rb @@ -0,0 +1,9 @@ +module TextHelper + def first_paragraph(text) + if text.blank? + "" + else + text.strip.split("\n").first + end + end +end diff --git a/app/views/legislation/processes/_process.html.erb b/app/views/legislation/processes/_process.html.erb index 9eac89a7b..a5780f792 100644 --- a/app/views/legislation/processes/_process.html.erb +++ b/app/views/legislation/processes/_process.html.erb @@ -3,7 +3,7 @@
<%= process.description %>
+ <%= simple_format(first_paragraph(process.description)) %>