Patch #2053 ยป ticket.patch
migrate_from_trac.rake (working copy) | ||
---|---|---|
260 | 260 |
text = text.gsub(/^(\=+)\s(.+)\s(\=+)/) {|s| "\nh#{$1.length}. #{$2}\n"} |
261 | 261 |
# External Links |
262 | 262 |
text = text.gsub(/\[(http[^\s]+)\s+([^\]]+)\]/) {|s| "\"#{$2}\":#{$1}"} |
263 | ||
264 |
# Situations like the following: |
|
265 |
# [ticket:234 Text],[ticket:234 This is a test] |
|
266 |
text = text.gsub(/\[ticket\:([^\ ]+)\ (.+?)\]/, '[[#\1|\2]]') |
|
267 |
# Situations like: |
|
268 |
# ticket:1234 |
|
269 |
# #1 is working cause Redmine uses the same syntax. |
|
270 |
text = text.gsub(/ticket\:([^\ ]+)/, '#\1') |
|
271 | ||
263 | 272 |
# Internal Links |
264 | 273 |
text = text.gsub(/\[\[BR\]\]/, "\n") # This has to go before the rules below |
265 | 274 |
text = text.gsub(/\[\"(.+)\".*\]/) {|s| "[[#{$1.delete(',./?;|:')}]]"} |