1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-12-12 05:20:26 +00:00

Strip extra whitespace from links

This commit is contained in:
bouncepaw 2021-02-06 21:16:21 +05:00
parent 671f7a05a6
commit 02e7cd2bfc

View File

@ -82,6 +82,7 @@ func (l *Link) ImgSrc() string {
// From returns a Link object given these `address` and `display` on relative to given `hyphaName`. // From returns a Link object given these `address` and `display` on relative to given `hyphaName`.
func From(address, display, hyphaName string) *Link { func From(address, display, hyphaName string) *Link {
address = strings.TrimSpace(address)
link := Link{ link := Link{
SrcAddress: address, SrcAddress: address,
SrcDisplay: display, SrcDisplay: display,