Patch #15975 ยป migrate_from_trac.headings.patch
| migrate_from_trac.rake.headings 2014-01-27 16:10:48.673060694 +0100 | ||
|---|---|---|
| 280 | 280 | # Basic wiki syntax conversion | 
| 281 | 281 | def self.convert_wiki_text(text) | 
| 282 | 282 | # Titles | 
| 283 |         text = text.gsub(/^(\=+)\s(.+)\s(\=+)/) {|s| "\nh#{$1.length}. #{$2}\n"}
 | |
| 283 |         text = text.gsub(/^\s*(\=+)\s(.+)\s(\=+)\s*$/) {|s| "\nh#{$1.length}. #{$2}\n"}
 | |
| 284 | 284 | # External Links | 
| 285 | 285 |         text = text.gsub(/\[(http[^\s]+)\s+([^\]]+)\]/) {|s| "\"#{$2}\":#{$1}"}
 | 
| 286 | 286 | # Ticket links: |