From cad83f4e7bc6eb9a6b0f3b699565a97b46535ee6 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sun, 5 Aug 2018 11:12:59 -0700 Subject: [PATCH] Tighten context snippet in slash command results --- server/presenters/slackAttachment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/presenters/slackAttachment.js b/server/presenters/slackAttachment.js index c782f0924..a8f842126 100644 --- a/server/presenters/slackAttachment.js +++ b/server/presenters/slackAttachment.js @@ -5,7 +5,7 @@ function present(document: Document, context?: string) { // the context contains tags around search terms, we convert them here // to the markdown format that slack expects to receive. const text = context - ? context.replace(/<\/?b>/g, '*') + ? context.replace(/<\/?b>/g, '*').replace('\n', '') : document.getSummary(); return {