diff options
author | ThibG <thib@sitedethib.com> | 2019-04-10 22:33:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-10 22:33:41 +0200 |
commit | 31e4fcb006c6ef2d8e1a4c765e897afa1cba1b5c (patch) | |
tree | 15a022b1b44f72fee2d83cfe6f8355b7334f9d9b /app/helpers/application_helper.rb | |
parent | cb410f80a40d03b509cec244b0cdd4ed3957c6a0 (diff) | |
parent | 2f422b708f75bea87a49eb879ec3e0c3f35c2f9b (diff) |
Merge pull request #985 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r-- | app/helpers/application_helper.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index f70c37522..7ae1e5d0b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -118,4 +118,9 @@ module ApplicationHelper def storage_host? ENV['S3_ALIAS_HOST'].present? || ENV['S3_CLOUDFRONT_HOST'].present? end + + def quote_wrap(text, line_width: 80, break_sequence: "\n") + text = word_wrap(text, line_width: line_width - 2, break_sequence: break_sequence) + text.split("\n").map { |line| '> ' + line }.join("\n") + end end |