Skip to content

Commit

Permalink
fix: delimit function
Browse files Browse the repository at this point in the history
  • Loading branch information
reuixiy committed Jan 10, 2020
1 parent 88ea2c6 commit 1ab41b1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion layouts/partials/components/markdownify.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{{- $Deliver.Scratch.Set "Content" $raw -}}

{{- $enableEmoji := replaceRE `enableEmoji = (.+)` `$1` (delimit (readFile "config.toml" | findRE `enableEmoji = (.+)` | uniq) "") -}}
{{- $enableEmoji := replaceRE `enableEmoji = (.+)` `$1` (delimit (readFile "config.toml" | findRE `enableEmoji = (.+)` | uniq) " ") -}}

<!-- Emoji -->
{{- $Content := $Deliver.Scratch.Get "Content" -}}
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/minimal-footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
{{ with .Params.categories }}
<div class="post-category">
{{ if $.Site.Params.enableVerticalBarStructure }}
{{- $currentTopLevelCategory := (delimit (first 1 .) "") -}}
{{- $currentTopLevelCategory := (delimit (first 1 .) " ") -}}
{{- $url := urls.Parse ($currentTopLevelCategory | urlize) -}}
{{- $path := $url.Path -}}
{{- with $.Site.GetPage (printf `/categories/%s` $path) -}}
Expand All @@ -81,7 +81,7 @@
{{- $.Scratch.Delete "topLevelCategories" -}}
{{- range $.Site.RegularPages -}}
{{- with .Param "categories" -}}
{{- $topLevelCategory := (delimit (first 1 .) "" | urlize) -}}
{{- $topLevelCategory := ((delimit (first 1 .) " ") | urlize) -}}
{{- $.Scratch.Add "topLevelCategories" (slice $topLevelCategory) -}}
{{- end -}}
{{- end -}}
Expand Down

0 comments on commit 1ab41b1

Please sign in to comment.