Skip to content

Commit

Permalink
Fix wiki inter-links with spaces (#3560) (#3632)
Browse files Browse the repository at this point in the history
  • Loading branch information
lafriks authored and appleboy committed Mar 6, 2018
1 parent 93f34fd commit efc5a71
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/markup/html.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,11 @@ func RenderShortLinks(rawBytes []byte, urlPrefix string, noLink bool, isWikiMark
}
absoluteLink := isLink([]byte(link))
if !absoluteLink {
link = strings.Replace(link, " ", "+", -1)
if image {
link = strings.Replace(link, " ", "+", -1)
} else {
link = strings.Replace(link, " ", "-", -1)
}
}
if image {
if !absoluteLink {
Expand Down

0 comments on commit efc5a71

Please sign in to comment.