From 0c1799ad5fe92df19fcf0314e071d2603515b673 Mon Sep 17 00:00:00 2001
From: Adrian Wilkins <adrian.wilkins@nhs.net>
Date: Thu, 31 May 2012 10:29:09 +0100
Subject: Add slashes to the pattern for WikiCaps links

Trac permits dividing names like this, Redmine doesn't. It just ignores
the slashes in wiki page names both in the database and on the page,
so retaining them in the links works just fine at the Redmine end of
things.
---
 lib/tasks/migrate_from_trac.rake |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/tasks/migrate_from_trac.rake b/lib/tasks/migrate_from_trac.rake
index 26dec38..c5f65a0 100644
--- a/lib/tasks/migrate_from_trac.rake
+++ b/lib/tasks/migrate_from_trac.rake
@@ -301,7 +301,7 @@ namespace :redmine do
         text = text.gsub(/\[wiki:([^\s\]]+)\s(.*)\]/) {|s| "[[#{$1.delete(',./?;|:')}|#{$2.delete(',./?;|:')}]]"}
 
   # Links to pages UsingJustWikiCaps
-  text = text.gsub(/([^!]|^)(^| )([A-Z][a-z]+[A-Z][a-zA-Z]+)/, '\\1\\2[[\3]]')
+  text = text.gsub(/([^!]|^)(^| )([A-Z][a-z]+[A-Z][a-zA-Z\/]+)/, '\\1\\2[[\3]]')
   # Normalize things that were supposed to not be links
   # like !NotALink
   text = text.gsub(/(^| )!([A-Z][A-Za-z]+)/, '\1\2')
-- 
1.7.9.5

