Commit 888b2548 authored by John Goerzen's avatar John Goerzen

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
parent 83061e9c
...@@ -217,8 +217,8 @@ namespace :redmine do ...@@ -217,8 +217,8 @@ 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(',./?;|:')}]]"} text = text.gsub(/\[wiki:([^\s\]]+).*\]/) {|s| "[[#{$1.delete(',./?;|:')}]]"}
# Links to pages UsingJustCaps # Links to pages UsingJustWikiCaps
text = text.gsub(/[^!]\b([A-Z][a-z]+[A-Z][a-zA-Z]+)/, ' [[\1]]') text = text.gsub(/([^!]|^)(^| )([A-Z][a-z]+[A-Z][a-zA-Z]+)/, '\\1\\2[[\3]]')
# Normalize things that were supposed to not be links # Normalize things that were supposed to not be links
# like !NotALink # like !NotALink
text = text.gsub(/(^| )!([A-Z][A-Za-z]+)/, '\1\2') text = text.gsub(/(^| )!([A-Z][A-Za-z]+)/, '\1\2')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment