From 723dfad2ab4d96f49b1dba0c2431b359f6397f5b Mon Sep 17 00:00:00 2001 From: msdolbey Date: Tue, 5 Sep 2023 14:45:34 -0500 Subject: [PATCH] fix: extra space in link before punctuation (#89) Currently - there is an extra space that renders in the blogs if there is punctuation right after a link. Example: ![Screenshot 2023-09-05 at 2 21 08 PM](https://github.com/mesosphere/d2iq-engineering-blog/assets/5703649/3309e48e-e091-44b1-8b27-e3dbb27bec3c) Found at the bottom of this post: https://eng.d2iq.com/blog/profiling-kubernetes-controllers-with-pprof/ It appears it's because we added this: https://github.com/mesosphere/d2iq-engineering-blog/blob/main/themes/casperv5/layouts/_default/_markup/render-link.html This is a great add, because it will automatically make sure that links will go to a new tab/window. However, it adds an extra space if the link is followed by punctuation (`,` `.` etc.) This probably wasn't found before, because the markdown will get rid of any double/extra spaces if it's just on a normal line, followed by other words. BUT, it looks like it adds it here because there's an extra line that's added at the bottom of this html file. Getting rid of the new line gets rid of this nit picky sort of thing (from building it locally): ![Screenshot 2023-09-05 at 2 21 32 PM](https://github.com/mesosphere/d2iq-engineering-blog/assets/5703649/2df4e85d-09e0-4fc9-945c-83464468eb53) --- themes/casperv5/layouts/_default/_markup/render-link.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/casperv5/layouts/_default/_markup/render-link.html b/themes/casperv5/layouts/_default/_markup/render-link.html index bd906b9d..868f0e84 100644 --- a/themes/casperv5/layouts/_default/_markup/render-link.html +++ b/themes/casperv5/layouts/_default/_markup/render-link.html @@ -1 +1 @@ -{{ .Text | safeHTML }} +{{ .Text | safeHTML }} \ No newline at end of file