##// END OF EJS Templates
Fixed: Trac milestone links not correctly converted (#2052)....
Jean-Philippe Lang -
r2012:876a9b6ffb49
parent child
Show More
@@ -268,13 +268,23 namespace :redmine do
268 268 text = text.gsub(/^(\=+)\s(.+)\s(\=+)/) {|s| "\nh#{$1.length}. #{$2}\n"}
269 269 # External Links
270 270 text = text.gsub(/\[(http[^\s]+)\s+([^\]]+)\]/) {|s| "\"#{$2}\":#{$1}"}
271 # Situations like the following:
271 # Ticket links:
272 272 # [ticket:234 Text],[ticket:234 This is a test]
273 273 text = text.gsub(/\[ticket\:([^\ ]+)\ (.+?)\]/, '"\2":/issues/show/\1')
274 # Situations like:
275 274 # ticket:1234
276 275 # #1 is working cause Redmine uses the same syntax.
277 276 text = text.gsub(/ticket\:([^\ ]+)/, '#\1')
277 # Milestone links:
278 # [milestone:"0.1.0 Mercury" Milestone 0.1.0 (Mercury)]
279 # The text "Milestone 0.1.0 (Mercury)" is not converted,
280 # cause Redmine's wiki does not support this.
281 text = text.gsub(/\[milestone\:\"([^\"]+)\"\ (.+?)\]/, 'version:"\1"')
282 # [milestone:"0.1.0 Mercury"]
283 text = text.gsub(/\[milestone\:\"([^\"]+)\"\]/, 'version:"\1"')
284 text = text.gsub(/milestone\:\"([^\"]+)\"/, 'version:"\1"')
285 # milestone:0.1.0
286 text = text.gsub(/\[milestone\:([^\ ]+)\]/, 'version:\1')
287 text = text.gsub(/milestone\:([^\ ]+)/, 'version:\1')
278 288 # Internal Links
279 289 text = text.gsub(/\[\[BR\]\]/, "\n") # This has to go before the rules below
280 290 text = text.gsub(/\[\"(.+)\".*\]/) {|s| "[[#{$1.delete(',./?;|:')}]]"}
General Comments 0
You need to be logged in to leave comments. Login now