@@ -268,6 +268,13 namespace :redmine do | |||
|
268 | 268 | text = text.gsub(/^(\=+)\s(.+)\s(\=+)/) {|s| "\nh#{$1.length}. #{$2}\n"} |
|
269 | 269 | # External Links |
|
270 | 270 | text = text.gsub(/\[(http[^\s]+)\s+([^\]]+)\]/) {|s| "\"#{$2}\":#{$1}"} |
|
271 | # Situations like the following: | |
|
272 | # [ticket:234 Text],[ticket:234 This is a test] | |
|
273 | text = text.gsub(/\[ticket\:([^\ ]+)\ (.+?)\]/, '[[#\1|\2]]') | |
|
274 | # Situations like: | |
|
275 | # ticket:1234 | |
|
276 | # #1 is working cause Redmine uses the same syntax. | |
|
277 | text = text.gsub(/ticket\:([^\ ]+)/, '#\1') | |
|
271 | 278 | # Internal Links |
|
272 | 279 | text = text.gsub(/\[\[BR\]\]/, "\n") # This has to go before the rules below |
|
273 | 280 | text = text.gsub(/\[\"(.+)\".*\]/) {|s| "[[#{$1.delete(',./?;|:')}]]"} |
General Comments 0
You need to be logged in to leave comments.
Login now