🐛 Prevent whitespace at start of `render-link`

Fixes #695
pull/696/head
James Panther 2023-11-05 10:11:04 +11:00
parent 54c39a1297
commit 79a66d4fda
No known key found for this signature in database
GPG Key ID: D36F789E45745D17
2 changed files with 6 additions and 2 deletions

View File

@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [Unreleased] ## [Unreleased]
### Fixed
- Links with non-whitespace characters preceeding them are prefixed with a space ([#695](https://github.com/jpanther/congo/issues/695))
## [2.7.3] - 2023-10-31 ## [2.7.3] - 2023-10-31
### Fixed ### Fixed

View File

@ -1,5 +1,5 @@
{{ $link := .Destination }} {{- $link := .Destination -}}
{{ $isRemote := strings.HasPrefix $link "http" }} {{- $isRemote := strings.HasPrefix $link "http" -}}
{{- if not $isRemote }} {{- if not $isRemote }}
{{ $url := urls.Parse .Destination }} {{ $url := urls.Parse .Destination }}
{{ if $url.Path }} {{ if $url.Path }}