From d8532fc3c0ce3aae421ab987e38c28b5ce811f28 Mon Sep 17 00:00:00 2001 From: ParzivalPavlis Date: Thu, 24 Jul 2025 16:08:57 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fixed=20wrong=20heading=20splitt?= =?UTF-8?q?ing=20when=20using=20en=20dash=20in=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layouts/_default/_markup/render-heading.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html index cadae2d..de2a930 100644 --- a/layouts/_default/_markup/render-heading.html +++ b/layouts/_default/_markup/render-heading.html @@ -30,7 +30,8 @@ {{ else }} {{/* Multiple words - split to prevent line break in last word */}} {{ $lastWord := index $words (sub $wordCount 1) }} - {{ $withoutLast := substr $cleanText 0 (sub (len $cleanText) (add (len $lastWord) 1)) }} + {{ $wordsWithoutLast := first (sub $wordCount 1) $words }} + {{ $withoutLast := delimit $wordsWithoutLast " " }} {{- $withoutLast | safeHTML }} {{- $lastWord | safeHTML -}}