##// END OF EJS Templates
Fixed: Trac migration of ticket:123 or [ticket:34] do not work (#2053)....
Jean-Philippe Lang -
r2010:1802fa9348ea
parent child
Show More
@@ -268,6 +268,13 namespace :redmine do
268 text = text.gsub(/^(\=+)\s(.+)\s(\=+)/) {|s| "\nh#{$1.length}. #{$2}\n"}
268 text = text.gsub(/^(\=+)\s(.+)\s(\=+)/) {|s| "\nh#{$1.length}. #{$2}\n"}
269 # External Links
269 # External Links
270 text = text.gsub(/\[(http[^\s]+)\s+([^\]]+)\]/) {|s| "\"#{$2}\":#{$1}"}
270 text = text.gsub(/\[(http[^\s]+)\s+([^\]]+)\]/) {|s| "\"#{$2}\":#{$1}"}
271 # Situations like the following:
272 # [ticket:234 Text],[ticket:234 This is a test]
273 text = text.gsub(/\[ticket\:([^\ ]+)\ (.+?)\]/, '[[#\1|\2]]')
274 # Situations like:
275 # ticket:1234
276 # #1 is working cause Redmine uses the same syntax.
277 text = text.gsub(/ticket\:([^\ ]+)/, '#\1')
271 # Internal Links
278 # Internal Links
272 text = text.gsub(/\[\[BR\]\]/, "\n") # This has to go before the rules below
279 text = text.gsub(/\[\[BR\]\]/, "\n") # This has to go before the rules below
273 text = text.gsub(/\[\"(.+)\".*\]/) {|s| "[[#{$1.delete(',./?;|:')}]]"}
280 text = text.gsub(/\[\"(.+)\".*\]/) {|s| "[[#{$1.delete(',./?;|:')}]]"}
General Comments 0
You need to be logged in to leave comments. Login now