Merge pull request #6577 from opf/fix/textile_empty_paragraphs

gsub multitude of empty textile paragraphs

[ci skip]
pull/6582/head
Oliver Günther 6 years ago committed by GitHub
commit 87dc1eca22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      lib/open_project/text_formatting/formats/markdown/textile_converter.rb

@ -74,7 +74,6 @@ module OpenProject::TextFormatting::Formats
def run!
puts 'Starting conversion of Textile fields to CommonMark+GFM.'
puts 'Checking compatibility of your installed pandoc version.'
pandoc.check_arguments!
@ -421,7 +420,7 @@ module OpenProject::TextFormatting::Formats
# Remove empty paragraph blocks which trip up pandoc
def remove_empty_paragraphs(textile)
textile.gsub!(/\np\.\n/, '')
textile.gsub!(/\np(=|>)?\.[\s\.]*\n/, '')
end
# Replace numbered headings as they are not supported in commonmark/gfm

Loading…
Cancel
Save