mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-18 14:13:12 +00:00
refactor(hugo): use strings.ReplacePairs for chained replacements
Adopt Hugo v0.158's strings.ReplacePairs in rss.xml and parse_block_v3.html to replace nested replace calls.
This commit is contained in:
1 parent
815d25ca9d
commit
13dde12ae0
2 files changed
+2
-2
No files matched your search
@@ -265,7 +265,7 @@
|
||||
|
||||
{{ $hash_id := $block.id | default (printf "section-%s" (replace $block_type "." "-")) }}
|
||||
{{ $css_classes := $block.design.css_class | default "" }}
|
||||
{{ $widget_class := printf "blox-%s" (replace (replace $block_type "." "-") "_" "-") }}
|
||||
{{ $widget_class := printf "blox-%s" (strings.ReplacePairs $block_type "." "-" "_" "-") }}
|
||||
|
||||
{{/* Extract background-specific CSS classes */}}
|
||||
{{ $bg_css_classes := $bg.css_class | default "" }}
|
||||
|
||||
Reference in new issue
Block a user