mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
Improvements to email cook text rendering
This commit is contained in:
parent
0c3b049176
commit
bb90129731
2 changed files with 26 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue