fix typos of source comments at lib/redmine/wiki_formatting.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@13070 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2014-04-07 08:06:14 +00:00
parent 242b440073
commit 6067bfcd09
1 changed files with 7 additions and 7 deletions

View File

@ -111,20 +111,20 @@ module Redmine
(?=<|\s|$) (?=<|\s|$)
}x unless const_defined?(:AUTO_LINK_RE) }x unless const_defined?(:AUTO_LINK_RE)
# Destructively remplaces urls into clickable links # Destructively replaces urls into clickable links
def auto_link!(text) def auto_link!(text)
text.gsub!(AUTO_LINK_RE) do text.gsub!(AUTO_LINK_RE) do
all, leading, proto, url, post = $&, $1, $2, $3, $6 all, leading, proto, url, post = $&, $1, $2, $3, $6
if leading =~ /<a\s/i || leading =~ /![<>=]?/ if leading =~ /<a\s/i || leading =~ /![<>=]?/
# don't replace URL's that are already linked # don't replace URLs that are already linked
# and URL's prefixed with ! !> !< != (textile images) # and URLs prefixed with ! !> !< != (textile images)
all all
else else
# Idea below : an URL with unbalanced parethesis and # Idea below : an URL with unbalanced parenthesis and
# ending by ')' is put into external parenthesis # ending by ')' is put into external parenthesis
if ( url[-1]==?) and ((url.count("(") - url.count(")")) < 0 ) ) if ( url[-1]==?) and ((url.count("(") - url.count(")")) < 0 ) )
url=url[0..-2] # discard closing parenth from url url=url[0..-2] # discard closing parenthesis from url
post = ")"+post # add closing parenth to post post = ")"+post # add closing parenthesis to post
end end
content = proto + url content = proto + url
href = "#{proto=="www."?"http://www.":proto}#{url}" href = "#{proto=="www."?"http://www.":proto}#{url}"
@ -133,7 +133,7 @@ module Redmine
end end
end end
# Destructively remplaces email addresses into clickable links # Destructively replaces email addresses into clickable links
def auto_mailto!(text) def auto_mailto!(text)
text.gsub!(/([\w\.!#\$%\-+.]+@[A-Za-z0-9\-]+(\.[A-Za-z0-9\-]+)+)/) do text.gsub!(/([\w\.!#\$%\-+.]+@[A-Za-z0-9\-]+(\.[A-Za-z0-9\-]+)+)/) do
mail = $1 mail = $1