From 98378969dae552c0c190eea922415d35eb22ae1e Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 21 Oct 2023 23:47:52 -0400 Subject: Added contrast for quote speaker names --- app/assets/stylesheets/quotes/layout.css.sass | 3 +++ app/helpers/quotes_helper.rb | 1 + 2 files changed, 4 insertions(+) diff --git a/app/assets/stylesheets/quotes/layout.css.sass b/app/assets/stylesheets/quotes/layout.css.sass index e5dbd64..0b102db 100644 --- a/app/assets/stylesheets/quotes/layout.css.sass +++ b/app/assets/stylesheets/quotes/layout.css.sass @@ -92,6 +92,9 @@ body padding: 0 position: static width: 100% + .quote-speaker + font-weight: bold + color: green &:hover background-color: #fffcec .quote-header 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 def quote_format(text) text = text ? text.to_str : '' text = text.dup if text.frozen? + text.gsub!(/^([\(\[][^\]\)]*[\]\)] )?([^:\n]*): /, "\\1\\2: ") text.gsub!(/\r\n?/, "\n") # \r\n and \r -> \n text.gsub!(/\n/, '
') # 1 newline -> br text = sanitize(text) -- cgit 1.4.1