--- migrate_from_trac.rake.orig 2014-01-06 12:52:50.947867100 +0100 +++ migrate_from_trac.rake.headings 2014-01-27 16:10:48.673060694 +0100 @@ -280,7 +280,7 @@ namespace :redmine do # Basic wiki syntax conversion def self.convert_wiki_text(text) # Titles - text = text.gsub(/^(\=+)\s(.+)\s(\=+)/) {|s| "\nh#{$1.length}. #{$2}\n"} + text = text.gsub(/^\s*(\=+)\s(.+)\s(\=+)\s*$/) {|s| "\nh#{$1.length}. #{$2}\n"} # External Links text = text.gsub(/\[(http[^\s]+)\s+([^\]]+)\]/) {|s| "\"#{$2}\":#{$1}"} # Ticket links: