Patch #2052 ยป milestone.patch
| migrate_from_trac.rake (working copy) | ||
|---|---|---|
|
text = text.gsub(/^(\=+)\s(.+)\s(\=+)/) {|s| "\nh#{$1.length}. #{$2}\n"}
|
||
|
# External Links
|
||
|
text = text.gsub(/\[(http[^\s]+)\s+([^\]]+)\]/) {|s| "\"#{$2}\":#{$1}"}
|
||
|
# First Situation:
|
||
|
# [milestone:"0.1.0 Mercury" Milestone 0.1.0 (Mercury)]
|
||
|
# The text "Milestone 0.1.0 (Mercury)" is not converted,
|
||
|
# cause Redmine's wiki does not support this.
|
||
|
text = text.gsub(/\[milestone\:\"([^\"]+)\"\ (.+?)\]/, 'version:"\1"')
|
||
|
# Second Situation:
|
||
|
# [milestone:"0.1.0 Mercury"]
|
||
|
text = text.gsub(/\[milestone\:\"([^\"]+)\"\]/, 'version:"\1"')
|
||
|
text = text.gsub(/milestone\:\"([^\"]+)\"/, 'version:"\1"')
|
||
|
|
||
|
# Third Situation:
|
||
|
# milestone:0.1.0
|
||
|
text = text.gsub(/\[milestone\:([^\ ]+)\]/, 'version:\1')
|
||
|
text = text.gsub(/milestone\:([^\ ]+)/, 'version:\1')
|
||
|
# Internal Links
|
||
|
text = text.gsub(/\[\[BR\]\]/, "\n") # This has to go before the rules below
|
||
|
text = text.gsub(/\[\"(.+)\".*\]/) {|s| "[[#{$1.delete(',./?;|:')}]]"}
|
||