fixed quote line joining, linted
parent
49f0ff3904
commit
ad0540d07e
4
bot.rb
4
bot.rb
|
@ -11,7 +11,7 @@ def random_quote(quotes)
|
|||
quote += "From the #{quotes[entry][:tech]}: #{entry}\n"
|
||||
quote += '```'
|
||||
quote += quotes[entry][:quote]
|
||||
quote += '```'
|
||||
"#{quote}```"
|
||||
end
|
||||
|
||||
# map quote types
|
||||
|
@ -30,7 +30,7 @@ end
|
|||
|
||||
# preserves whitespace intention for quotes, expects array of strings, one line per element
|
||||
def make_pretty_quote(quote)
|
||||
quote.map { |line| line.gsub('^^', " \n").gsub('^', "\n") }.join.strip
|
||||
quote.map { |line| line.gsub('^^', " \n").gsub('^', "\n") }.join(' ').strip
|
||||
end
|
||||
|
||||
token = File.read('./token').strip
|
||||
|
|
Loading…
Reference in New Issue