Fix wiki inter-links with spaces (#3560) (#3632)

This commit is contained in:
Lauris BH 2018-03-06 10:43:50 +02:00 committed by Bo-Yi Wu
parent 93f34fd8a2
commit efc5a7171b
1 changed files with 5 additions and 1 deletions

View File

@ -391,7 +391,11 @@ func RenderShortLinks(rawBytes []byte, urlPrefix string, noLink bool, isWikiMark
} }
absoluteLink := isLink([]byte(link)) absoluteLink := isLink([]byte(link))
if !absoluteLink { if !absoluteLink {
link = strings.Replace(link, " ", "+", -1) if image {
link = strings.Replace(link, " ", "+", -1)
} else {
link = strings.Replace(link, " ", "-", -1)
}
} }
if image { if image {
if !absoluteLink { if !absoluteLink {