diff options
Diffstat (limited to 'app/models/commit.rb')
-rw-r--r-- | app/models/commit.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/app/models/commit.rb b/app/models/commit.rb index baccf286740..e0461809e10 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -88,11 +88,12 @@ class Commit # cut off, ellipses (`&hellp;`) are prepended to the commit message. def description title_end = safe_message.index("\n") - @description ||= if (!title_end && safe_message.length > 100) || (title_end && title_end > 100) - "…".html_safe << safe_message[80..-1] - else - safe_message.split("\n", 2)[1].try(:chomp) - end + @description ||= + if (!title_end && safe_message.length > 100) || (title_end && title_end > 100) + "…".html_safe << safe_message[80..-1] + else + safe_message.split("\n", 2)[1].try(:chomp) + end end def description? |