Better handling of external link style assignment.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@792 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2007-10-01 17:45:40 +00:00
parent 48fb20f540
commit 47e7ceacd7
4 changed files with 14 additions and 16 deletions
+3 -1
View File
@@ -784,7 +784,9 @@ class RedCloth < String
atts << " title=\"#{ title }\"" if title
atts = shelve( atts ) if atts
"#{ pre }<a#{ atts }>#{ text }</a>#{ post }"
external = (url =~ /^http:\/\//) ? ' class="external"' : ''
"#{ pre }<a#{ atts }#{ external }>#{ text }</a>#{ post }"
end
end
+1 -1
View File
@@ -99,7 +99,7 @@ module Redmine
# and URL's prefixed with ! !> !< != (textile images)
all
else
%(#{leading}<a href="#{proto=="www."?"http://www.":proto}#{url}">#{proto + url}</a>#{post})
%(#{leading}<a class="external" href="#{proto=="www."?"http://www.":proto}#{url}">#{proto + url}</a>#{post})
end
end
end