aboutsummaryrefslogtreecommitdiffstats
path: root/modules/markup/html_link.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/markup/html_link.go')
-rw-r--r--modules/markup/html_link.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/markup/html_link.go b/modules/markup/html_link.go
index 5fd38b63cd..fea82e50ab 100644
--- a/modules/markup/html_link.go
+++ b/modules/markup/html_link.go
@@ -9,6 +9,7 @@ import (
"strings"
"code.gitea.io/gitea/modules/markup/common"
+ "code.gitea.io/gitea/modules/util"
"golang.org/x/net/html"
"golang.org/x/net/html/atom"
@@ -171,6 +172,10 @@ func linkProcessor(ctx *RenderContext, node *html.Node) {
}
uri := node.Data[m[0]:m[1]]
+ remaining := node.Data[m[1]:]
+ if util.IsLikelySplitLeftPart(remaining) {
+ return
+ }
replaceContent(node, m[0], m[1], createLink(ctx, uri, uri, "" /*link*/))
node = node.NextSibling.NextSibling
}