Skip to content

Commit

Permalink
Merge pull request #1361 from DMPRoadmap/master
Browse files Browse the repository at this point in the history
pulling in bugfix for text downloads
  • Loading branch information
briri authored Apr 9, 2018
2 parents 16bcf7a + b3f4813 commit d0e7a11
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/views/shared/export/_plan_txt.erb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<% section[:questions].each do |question| %>
<% if @show_sections_questions %>
<%# text in this case is an array to accomodate for option_based %>
<% if question[:text].length > 1 %>
<% if question[:text].respond_to?(:each) %>
<% question[:text].each do |txt| %>
<%= "#{strip_tags(txt.gsub(/<br\/?>/, '\n'))}\n" %>
<% end %>
Expand All @@ -47,9 +47,8 @@
<% answer.question_options.each do |opt| %>
<%= " #{opt.text}\n" %>
<% end %>
<% else %>
<%= " #{strip_tags(answer.text.gsub(/<\/?p>/, '').gsub(/<br\s?\/?>/, '\n').chomp)}\n\n" if answer.text.present? %>
<% end %>
<%= " #{strip_tags(answer.text.gsub(/<\/?p>/, '').gsub(/<br\s?\/?>/, '\n').chomp)}\n\n" if answer.text.present? %>
<% end %>
<% end %>
<% end %>
Expand Down

0 comments on commit d0e7a11

Please sign in to comment.