diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-09-11 22:46:37 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-09-11 22:46:37 +0300 |
commit | 13fec18ac9cbdecdef3b0e5fb7dd7480e9d7cbbf (patch) | |
tree | 5afa3a0bcafeca3dbaefab778d0c2778135742ea /app/helpers/events_helper.rb | |
parent | c9f741bb07bac1722dcbfeb909acd4ed49d1d1ae (diff) | |
download | gitlab-ce-13fec18ac9cbdecdef3b0e5fb7dd7480e9d7cbbf.tar.gz |
Truncate some text from dashboard events
Diffstat (limited to 'app/helpers/events_helper.rb')
-rw-r--r-- | app/helpers/events_helper.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb index 3c637404c4f..cd8761a6113 100644 --- a/app/helpers/events_helper.rb +++ b/app/helpers/events_helper.rb @@ -123,6 +123,8 @@ module EventsHelper end def event_note(text) - sanitize(markdown(truncate(text, length: 150)), tags: %w(a img b pre p)) + text = first_line(text) + text = truncate(text, length: 150) + sanitize(markdown(text), tags: %w(a img b pre p)) end end |