Skip to content

Commit efc5a71

Browse files
lafriksappleboy
authored andcommitted
Fix wiki inter-links with spaces (#3560) (#3632)
1 parent 93f34fd commit efc5a71

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

modules/markup/html.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,11 @@ func RenderShortLinks(rawBytes []byte, urlPrefix string, noLink bool, isUncycloMark
391391
}
392392
absoluteLink := isLink([]byte(link))
393393
if !absoluteLink {
394-
link = strings.Replace(link, " ", "+", -1)
394+
if image {
395+
link = strings.Replace(link, " ", "+", -1)
396+
} else {
397+
link = strings.Replace(link, " ", "-", -1)
398+
}
395399
}
396400
if image {
397401
if !absoluteLink {

0 commit comments

Comments
 (0)