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 += "From the #{quotes[entry][:tech]}: #{entry}\n"
|
||||||
quote += '```'
|
quote += '```'
|
||||||
quote += quotes[entry][:quote]
|
quote += quotes[entry][:quote]
|
||||||
quote += '```'
|
"#{quote}```"
|
||||||
end
|
end
|
||||||
|
|
||||||
# map quote types
|
# map quote types
|
||||||
|
@ -30,7 +30,7 @@ end
|
||||||
|
|
||||||
# preserves whitespace intention for quotes, expects array of strings, one line per element
|
# preserves whitespace intention for quotes, expects array of strings, one line per element
|
||||||
def make_pretty_quote(quote)
|
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
|
end
|
||||||
|
|
||||||
token = File.read('./token').strip
|
token = File.read('./token').strip
|
||||||
|
|
Loading…
Reference in New Issue