patterns.lua

Trim whitespace off the ends of strings (partial fix for
https://github.com/topkecleon/otouto/issues/74).
  Make output style consistent with translate.lua.
This commit is contained in:
topkecleon 2016-07-26 17:50:31 -04:00
parent b7c81c464f
commit e19d2e1e84

View File

@ -25,8 +25,8 @@ function patterns:action(msg)
utilities.send_reply(self, msg, 'Malformed pattern!')
else
output = output:sub(1, 4000)
output = 'Did you mean:\n"' .. output .. '"'
utilities.send_reply(self, msg.reply_to_message, output)
output = '*Did you mean:*\n"' .. utilities.md_escape(utilities.trim(output)) .. '"'
utilities.send_reply(self, msg.reply_to_message, output, true)
end
end