This commit is contained in:
albert
2013-03-02 18:18:51 -05:00
parent 1136dc6dfa
commit e28c786fa1
2 changed files with 2 additions and 1 deletions

View File

@@ -27,7 +27,7 @@ class DText
end
def self.parse_links(str)
str.gsub(/("[^"]+":(https?:\/\/|\/)\S+|https?:\/\/\S+)/m) do |url|
str.gsub(/("[^"]+":(https?:\/\/|\/)[^\s\r\n<>]+|https?:\/\/[^\s\r\n<>]+)+/) do |url|
if url =~ /^"([^"]+)":(.+)$/
text = $1
url = $2