mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 02:41:13 +08:00
Improvements to email cook text rendering
This commit is contained in:
@ -26,11 +26,15 @@ class EmailCook
|
||||
in_quote = false
|
||||
else
|
||||
|
||||
sz = l.size
|
||||
|
||||
l.scan(EmailCook.url_regexp).each do |m|
|
||||
url = m[0]
|
||||
l.gsub!(url, "<a href='#{url}'>#{url}</a>")
|
||||
end
|
||||
result << l << "<br>"
|
||||
|
||||
result << l
|
||||
result << "<br>" if sz < 60
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user