Tighten context snippet in slash command results

This commit is contained in:
Tom Moor
2018-08-05 11:12:59 -07:00
parent 61b6b18148
commit cad83f4e7b

View File

@ -5,7 +5,7 @@ function present(document: Document, context?: string) {
// the context contains <b> tags around search terms, we convert them here // the context contains <b> tags around search terms, we convert them here
// to the markdown format that slack expects to receive. // to the markdown format that slack expects to receive.
const text = context const text = context
? context.replace(/<\/?b>/g, '*') ? context.replace(/<\/?b>/g, '*').replace('\n', '')
: document.getSummary(); : document.getSummary();
return { return {