From c0be3e585a5ef6c6dc4d517e891fd10bc053c195 Mon Sep 17 00:00:00 2001 From: Martijn Braam Date: Tue, 4 Feb 2020 13:22:05 +0100 Subject: Enable intra-word emphasis supression in markdown (#999) This fixes plain links sent to Matrix being broken if they contain underscores. Fixes issue #997 --- bridge/helper/helper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridge/helper/helper.go b/bridge/helper/helper.go index 8d75a8ad..41244766 100644 --- a/bridge/helper/helper.go +++ b/bridge/helper/helper.go @@ -180,7 +180,7 @@ func ClipMessage(text string, length int) string { // ParseMarkdown takes in an input string as markdown and parses it to html func ParseMarkdown(input string) string { - extensions := parser.HardLineBreak + extensions := parser.HardLineBreak | parser.NoIntraEmphasis markdownParser := parser.NewWithExtensions(extensions) renderer := html.NewRenderer(html.RendererOptions{ Flags: 0, -- cgit v1.2.3