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
This commit is contained in:
John Goerzen 2008-03-15 13:24:08 +00:00
parent 83061e9ca2
commit 888b254844
1 changed files with 2 additions and 2 deletions

View File

@ -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')