commit 6d821194bf81462c35bdd706134a5e42e76cfa9a
Author: Wim <wim@42.be>
Date: Sun Mar 03 00:29:29 2019 +0000
diff --git a/bridge/helper/helper.go b/bridge/helper/helper.go
index c336fd1..dceb484 100644
--- a/bridge/helper/helper.go
+++ b/bridge/helper/helper.go
@@ -1787 +17810 @@ 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, "<p>")
+ res = strings.TrimSuffix(res, "</p>\n")
+ return res
}
// ConvertWebPToPNG convert input data (which should be WebP format to PNG format)