diff options
author | John Goerzen <jgoerzen@complete.org> | 2008-03-15 13:24:08 +0000 |
---|---|---|
committer | John Goerzen <jgoerzen@complete.org> | 2008-03-15 13:24:08 +0000 |
commit | 888b254844092cc4b007fd6e40db719c6ed8dfc8 (patch) | |
tree | b8a9d9e73e13a8f108516003d17ae0d3fc42ea8c /lib/tasks | |
parent | 83061e9ca29ac224da3385f930508f89ad04a5bf (diff) | |
download | redmine-888b254844092cc4b007fd6e40db719c6ed8dfc8.tar.gz redmine-888b254844092cc4b007fd6e40db719c6ed8dfc8.zip |
Further refine WikiCaps processing for Trac to eliminate problems in
some corner cases
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1258 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/migrate_from_trac.rake | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tasks/migrate_from_trac.rake b/lib/tasks/migrate_from_trac.rake index 51d85fe0f..f1d754109 100644 --- a/lib/tasks/migrate_from_trac.rake +++ b/lib/tasks/migrate_from_trac.rake @@ -217,8 +217,8 @@ namespace :redmine do 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]]') + # Links to pages UsingJustWikiCaps + 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') |