Skip to content

Commit

Permalink
fix: ensure relref in search index is properly rendered (#196)
Browse files Browse the repository at this point in the history
* fix: ensure relref in search index is properly rendered

* chore: remove empty whitespace
  • Loading branch information
imfing committed Nov 10, 2023
1 parent 4ea1816 commit c0a1bc3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions layouts/partials/utils/fragments.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
{{ $headingTitle := index $headingTitles $i }}

{{ if eq $i 0 }}
{{ $data = $data | merge (dict $headingKey ($content | markdownify | plainify | htmlUnescape | chomp)) }}
{{ $data = $data | merge (dict $headingKey ($content | $page.RenderString | plainify | htmlUnescape | chomp)) }}
{{ else }}
{{ $parts := split $content (printf "\n%s\n" $headingTitle) }}
{{ $lastPart := index $parts (sub (len $parts) 1) }}

{{ $data = $data | merge (dict $headingKey ($lastPart | markdownify | plainify | htmlUnescape | chomp)) }}
{{ $data = $data | merge (dict $headingKey ($lastPart | $page.RenderString | plainify | htmlUnescape | chomp)) }}
{{ $content = strings.TrimSuffix $lastPart $content }}
{{ $content = strings.TrimSuffix (printf "\n%s\n" $headingTitle) $content }}
{{ end }}
Expand Down

0 comments on commit c0a1bc3

Please sign in to comment.