commit d9e04ec627845175107df75c32177151f52b5d18 Author: John Goerzen Date: Fri Feb 29 22:19:28 2008 -0600 Support WikiCaps on Trac migration Trac lets you simply say FooBar to reference that particular wiki page diff --git a/lib/tasks/migrate_from_trac.rake b/lib/tasks/migrate_from_trac.rake index b921417..d59a0a2 100644 --- a/lib/tasks/migrate_from_trac.rake +++ b/lib/tasks/migrate_from_trac.rake @@ -216,6 +216,12 @@ namespace :redmine do text = text.gsub(/\[wiki:\"(.+)\".*\]/) {|s| "[[#{$1.delete(',./?;|:')}]]"} text = text.gsub(/\[wiki:\"(.+)\".*\]/) {|s| "[[#{$1.delete(',./?;|:')}]]"} text = text.gsub(/\[wiki:([^\s\]]+).*\]/) {|s| "[[#{$1.delete(',./?;|:')}]]"} + + # Links to pages UsingJustCaps + text = text.gsub(/[^!]\b([A-Z][a-z]+[A-Z][a-zA-Z]+)/, '[[\1]]') + # Normalize things that were supposed to not be links + # like !NotALink + text = text.gsub(/(^| )!([A-Z][A-Za-z]+)/, '\1\2') # Revisions links text = text.gsub(/\[(\d+)\]/, 'r\1') # Ticket number re-writing