You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by se...@apache.org on 2023/03/26 14:06:49 UTC

[comdev-site] branch master updated: Avoid converting 101.html into 101st

This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/comdev-site.git


The following commit(s) were added to refs/heads/master by this push:
     new 8584587  Avoid converting 101.html into 101st
8584587 is described below

commit 8584587541d81c96ecac77fa921de9875e4c0415
Author: Sebb <se...@apache.org>
AuthorDate: Sun Mar 26 15:06:41 2023 +0100

    Avoid converting 101.html into 101st
    
    humanize first so the trailing .html protects a bare number
    Then string the suffix (which may have been capitalised)
---
 layouts/partials/breadcrumbs.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/layouts/partials/breadcrumbs.html b/layouts/partials/breadcrumbs.html
index 08e0b20..f94b6e6 100644
--- a/layouts/partials/breadcrumbs.html
+++ b/layouts/partials/breadcrumbs.html
@@ -6,7 +6,7 @@
     {{ range $index, $element := split $url "/" }}
         {{ $.Scratch.Add "path" $element }}
         {{ if ne $element "" }}
-            <li class="breadcrumb-item"><a href='{{ $.Scratch.Get "path" }}'>{{ replace . ".html" "" | humanize }}</a></li>
+            <li class="breadcrumb-item"><a href='{{ $.Scratch.Get "path" }}'>{{ humanize . | replaceRE "\\.[hH]tml$" "" }}</a></li>
             {{ $.Scratch.Add "path" "/" }}
         {{ end }}
     {{ end }}