FIX: Don't incluide a trailing `<br>` in the bio excerpt

This commit is contained in:
Robin Ward 2017-05-18 16:39:48 -04:00
parent 3065b7db4c
commit ed4b2b6d8d
1 changed files with 1 additions and 1 deletions

View File

@ -20,7 +20,7 @@ class UserProfile < ActiveRecord::Base
BAKED_VERSION = 1
def bio_excerpt(length=350, opts={})
excerpt = PrettyText.excerpt(bio_cooked, length, opts)
excerpt = PrettyText.excerpt(bio_cooked, length, opts).sub(/<br>$/, '')
return excerpt if excerpt.blank? || (user.has_trust_level?(TrustLevel[1]) && !user.suspended?)
PrettyText.strip_links(excerpt)
end