From efcf8a7c3461960d006e4c6908285d71d5511f4f Mon Sep 17 00:00:00 2001 From: Ethan Burns Date: Tue, 26 Mar 2019 19:31:09 -0400 Subject: [PATCH] Fix tl;dr formatting Remove extra space before `:`. Make topics bold. Add a blank line between topics. Remove leading tabs. --- plugins/tldr/tldr.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/tldr/tldr.go b/plugins/tldr/tldr.go index 0f5b434..80666eb 100644 --- a/plugins/tldr/tldr.go +++ b/plugins/tldr/tldr.go @@ -101,10 +101,11 @@ func (p *TLDRPlugin) message(kind bot.Kind, message msg.Message, args ...interfa bestTopic = vocab[word] } } - response += fmt.Sprintf("Topic #%d : %s\n", topic, bestTopic) + response += fmt.Sprintf("\n*Topic #%d: %s*\n", topic, bestTopic) for i := range bestDocs[topic] { - response += fmt.Sprintf("\t<%s>%s [%f]\n", bestDocs[topic][i].user, bestDocs[topic][i].body, bestScores[topic][i]) + response += fmt.Sprintf("<%s>%s [%f]\n", bestDocs[topic][i].user, bestDocs[topic][i].body, bestScores[topic][i]) } + } p.bot.Send(bot.Message, message.Channel, response)