diff --git a/.prettierrc b/.prettierrc
index d884083f..15acafac 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -1,9 +1,11 @@
{
+ "plugins": ["prettier-plugin-go-template"],
"goTemplateBracketSpacing": true,
"htmlWhitespaceSensitivity": "css",
"printWidth": 100,
"singleQuote": false,
"tabWidth": 2,
+ "useTabs": false,
"trailingComma": "es5",
"overrides": [
{
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2e9df036..22be3bed 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [Unreleased]
+### Fixed
+
+- Extra whitespace added after links ([#679](https://github.com/jpanther/congo/issues/679))
+
## [2.7.1] - 2023-10-24
### Changed
diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html
index 2cb38063..d1d4575a 100644
--- a/layouts/_default/_markup/render-heading.html
+++ b/layouts/_default/_markup/render-heading.html
@@ -1 +1 @@
-{{ .Text | safeHTML }} {{ if .Page.Params.showHeadingAnchors | default (.Page.Site.Params.article.showHeadingAnchors | default true) }}#{{ end }}
+{{ .Text | safeHTML }} {{ if .Page.Params.showHeadingAnchors | default (.Page.Site.Params.article.showHeadingAnchors | default true) }}#{{ end }}
\ No newline at end of file
diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html
index c1fe3634..ac82a6aa 100644
--- a/layouts/_default/_markup/render-image.html
+++ b/layouts/_default/_markup/render-image.html
@@ -61,4 +61,4 @@
{{ with $caption }}{{ . | markdownify }}{{ end }}
{{ end }}
-{{ end }}
+{{ end }}
\ No newline at end of file
diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html
index e42c035c..d0d013ae 100644
--- a/layouts/_default/_markup/render-link.html
+++ b/layouts/_default/_markup/render-link.html
@@ -1,10 +1,11 @@
{{ $link := .Destination }}
{{ $isRemote := strings.HasPrefix $link "http" }}
-{{- if not $isRemote -}}
-{{ $url := urls.Parse .Destination }}
-{{- if $url.Path -}}
-{{ $fragment := "" }}
-{{- with $url.Fragment }}{{ $fragment = printf "#%s" . }}{{ end -}}
-{{- with .Page.GetPage $url.Path }}{{ $link = printf "%s%s" .RelPermalink $fragment }}{{ end }}{{ end -}}
-{{- end -}}
-{{ .Text | safeHTML }}
+{{- if not $isRemote }}
+ {{ $url := urls.Parse .Destination }}
+ {{ if $url.Path }}
+ {{ $fragment := "" }}
+ {{- with $url.Fragment }}{{ $fragment = printf "#%s" . }}{{ end -}}
+ {{- with .Page.GetPage $url.Path }}{{ $link = printf "%s%s" .RelPermalink $fragment }}{{ end -}}
+ {{ end }}
+{{ end -}}
+{{- .Text | safeHTML -}}
\ No newline at end of file