Fix wiki inter-links with cases and add tests for this case (#3560)

This commit is contained in:
Chaz Reid 2018-03-05 10:39:12 -08:00 committed by Lauris BH
parent 171914e9a7
commit 69ea5e4385
2 changed files with 16 additions and 6 deletions

View file

@ -464,7 +464,11 @@ func shortLinkProcessorFull(ctx *postProcessCtx, node *html.Node, noLink bool) {
childNode.Parent = linkNode
absoluteLink := isLinkStr(link)
if !absoluteLink {
link = strings.Replace(link, " ", "+", -1)
if image {
link = strings.Replace(link, " ", "+", -1)
} else {
link = strings.Replace(link, " ", "-", -1)
}
}
urlPrefix := ctx.urlPrefix
if image {