##// END OF EJS Templates
Small fix to the Redmine links regexp....
Jean-Philippe Lang -
r1253:030afe742816
parent child
Show More
@@ -287,7 +287,7 module ApplicationHelper
287 287 # source:some/file#L120 -> Link to line 120 of the file
288 288 # source:some/file@52#L120 -> Link to line 120 of the file's revision 52
289 289 # export:some/file -> Force the download of the file
290 text = text.gsub(%r{([\s\(,-^])(!)?(attachment|document|version|commit|source|export)?((#|r)(\d+)|(:)([^"][^\s<>]+|"[^"]+"))(?=[[:punct:]]|\s|<|$)}) do |m|
290 text = text.gsub(%r{([\s\(,-^])(!)?(attachment|document|version|commit|source|export)?((#|r)(\d+)|(:)([^"\s<>][^\s<>]*|"[^"]+"))(?=[[:punct:]]|\s|<|$)}) do |m|
291 291 leading, esc, prefix, sep, oid = $1, $2, $3, $5 || $7, $6 || $8
292 292 link = nil
293 293 if esc.nil?
@@ -105,6 +105,8 class ApplicationHelperTest < HelperTestCase
105 105 '!version:1.0' => 'version:1.0',
106 106 '!version:"1.0"' => 'version:"1.0"',
107 107 '!source:/some/file' => 'source:/some/file',
108 # invalid expressions
109 'source:' => 'source:'
108 110 }
109 111 @project = Project.find(1)
110 112 to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
General Comments 0
You need to be logged in to leave comments. Login now