##// END OF EJS Templates
fix typos of source comments at lib/redmine/wiki_formatting.rb...
Toshi MARUYAMA -
r12795:6067bfcd0974
parent child
Show More
@@ -111,20 +111,20 module Redmine
111 111 (?=<|\s|$)
112 112 }x unless const_defined?(:AUTO_LINK_RE)
113 113
114 # Destructively remplaces urls into clickable links
114 # Destructively replaces urls into clickable links
115 115 def auto_link!(text)
116 116 text.gsub!(AUTO_LINK_RE) do
117 117 all, leading, proto, url, post = $&, $1, $2, $3, $6
118 118 if leading =~ /<a\s/i || leading =~ /![<>=]?/
119 # don't replace URL's that are already linked
120 # and URL's prefixed with ! !> !< != (textile images)
119 # don't replace URLs that are already linked
120 # and URLs prefixed with ! !> !< != (textile images)
121 121 all
122 122 else
123 # Idea below : an URL with unbalanced parethesis and
123 # Idea below : an URL with unbalanced parenthesis and
124 124 # ending by ')' is put into external parenthesis
125 125 if ( url[-1]==?) and ((url.count("(") - url.count(")")) < 0 ) )
126 url=url[0..-2] # discard closing parenth from url
127 post = ")"+post # add closing parenth to post
126 url=url[0..-2] # discard closing parenthesis from url
127 post = ")"+post # add closing parenthesis to post
128 128 end
129 129 content = proto + url
130 130 href = "#{proto=="www."?"http://www.":proto}#{url}"
@@ -133,7 +133,7 module Redmine
133 133 end
134 134 end
135 135
136 # Destructively remplaces email addresses into clickable links
136 # Destructively replaces email addresses into clickable links
137 137 def auto_mailto!(text)
138 138 text.gsub!(/([\w\.!#\$%\-+.]+@[A-Za-z0-9\-]+(\.[A-Za-z0-9\-]+)+)/) do
139 139 mail = $1
General Comments 0
You need to be logged in to leave comments. Login now