Project

General

Profile

Defect #14412 » 14412_remove_collapse_tags_in_pdf_export_r12037.diff

David Majorel, 2013-07-21 12:30

View differences:

lib/redmine/export/pdf.rb (working copy)
end
def formatted_text(text)
# Remove {{collapse()}} tags, but keep content
text.gsub!(/\{\{collapse\(.*?\)(.*?)\}\}/m, '\1')
html = Redmine::WikiFormatting.to_html(Setting.text_formatting, text)
# Strip {{toc}} tags
html.gsub!(/<p>\{\{([<>]?)toc\}\}<\/p>/i, '')
(3-3/3)