Skip to content

Commit

Permalink
Fix two more instances of + signs added to links.
Browse files Browse the repository at this point in the history
The first is image URLs rendered by markdown.go,
the second is shortlinks rendered by html.go.

However, with this commit I feel more certain
that + was chosen for a reason, so it might be
a good idea to track that down before this PR
is accepted.
  • Loading branch information
charlesreid1 committed Feb 22, 2018
1 parent 01432d3 commit ce3a180
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/markup/html.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ func RenderShortLinks(rawBytes []byte, urlPrefix string, noLink bool, isWikiMark
}
absoluteLink := isLink([]byte(link))
if !absoluteLink {
link = strings.Replace(link, " ", "+", -1)
link = strings.Replace(link, " ", "-", -1)
}
if image {
if !absoluteLink {
Expand Down
2 changes: 1 addition & 1 deletion modules/markup/markdown/markdown.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func (r *Renderer) Image(out *bytes.Buffer, link []byte, title []byte, alt []byt
} else {
lnk := string(link)
lnk = util.URLJoin(prefix, lnk)
lnk = strings.Replace(lnk, " ", "+", -1)
lnk = strings.Replace(lnk, " ", "-", -1)
link = []byte(lnk)
}
}
Expand Down

0 comments on commit ce3a180

Please sign in to comment.