From e955a056e2aa4a07c6375315113886b2ee86138c Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 3 Mar 2019 00:29:29 +0100 Subject: Trim

and

tags (matrix). Closes #686 (#753) --- bridge/helper/helper.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bridge/helper/helper.go b/bridge/helper/helper.go index c336fd13..dceb4848 100644 --- a/bridge/helper/helper.go +++ b/bridge/helper/helper.go @@ -178,7 +178,10 @@ func ClipMessage(text string, length int) string { func ParseMarkdown(input string) string { md := markdown.New(markdown.XHTMLOutput(true), markdown.Breaks(true)) - return (md.RenderToString([]byte(input))) + res := md.RenderToString([]byte(input)) + res = strings.TrimPrefix(res, "

") + res = strings.TrimSuffix(res, "

\n") + return res } // ConvertWebPToPNG convert input data (which should be WebP format to PNG format) -- cgit v1.2.3