wiki-links.patch

Trac inporter wiki links fix - Paul Rivier, 2008-05-22 16:41

Download (918 Bytes)

View differences:

lib/tasks/migrate_from_trac.rake Thu May 22 16:12:06 2008 +0200
233 233
        text = text.gsub(/\[\"(.+)\".*\]/) {|s| "[[#{$1.delete(',./?;|:')}]]"}
234 234
        text = text.gsub(/\[wiki:\"(.+)\".*\]/) {|s| "[[#{$1.delete(',./?;|:')}]]"}
235 235
        text = text.gsub(/\[wiki:\"(.+)\".*\]/) {|s| "[[#{$1.delete(',./?;|:')}]]"}
236
        text = text.gsub(/\[wiki:([^\s\]]+).*\]/) {|s| "[[#{$1.delete(',./?;|:')}]]"}
236
        text = text.gsub(/\[wiki:([^\s\]]+)\]/) {|s| "[[#{$1.delete(',./?;|:')}]]"}
237
        text = text.gsub(/\[wiki:([^\s\]]+)\s(.*)\]/) {|s|
238
          "[[#{$1.delete(',./?;|:')}|#{$2.delete(',./?;|:')}]]"}
237 239

  
238 240
	# Links to pages UsingJustWikiCaps
239 241
	text = text.gsub(/([^!]|^)(^| )([A-Z][a-z]+[A-Z][a-zA-Z]+)/, '\\1\\2[[\3]]')