about summary refs log tree commit diff stats
path: root/app/helpers
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-10-21 23:47:52 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-10-21 23:47:52 -0400
commit98378969dae552c0c190eea922415d35eb22ae1e (patch)
tree9754cc80863564284bb242aa47cb2975726b920f /app/helpers
parent20f2479b33bc548c4736cdc1ceffde6e3af3a31d (diff)
downloadthoughts-98378969dae552c0c190eea922415d35eb22ae1e.tar.gz
thoughts-98378969dae552c0c190eea922415d35eb22ae1e.tar.bz2
thoughts-98378969dae552c0c190eea922415d35eb22ae1e.zip
Added contrast for quote speaker names
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/quotes_helper.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/helpers/quotes_helper.rb b/app/helpers/quotes_helper.rb index 3c2acf9..c0753e0 100644 --- a/app/helpers/quotes_helper.rb +++ b/app/helpers/quotes_helper.rb
@@ -2,6 +2,7 @@ module QuotesHelper
2 def quote_format(text) 2 def quote_format(text)
3 text = text ? text.to_str : '' 3 text = text ? text.to_str : ''
4 text = text.dup if text.frozen? 4 text = text.dup if text.frozen?
5 text.gsub!(/^([\(\[][^\]\)]*[\]\)] )?([^:\n]*): /, "\\1<span class=\"quote-speaker\">\\2</span>: ")
5 text.gsub!(/\r\n?/, "\n") # \r\n and \r -> \n 6 text.gsub!(/\r\n?/, "\n") # \r\n and \r -> \n
6 text.gsub!(/\n/, '<br />') # 1 newline -> br 7 text.gsub!(/\n/, '<br />') # 1 newline -> br
7 text = sanitize(text) 8 text = sanitize(text)