Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/h-enk/doks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenk Verlinde <henk@ventizo.com>2022-05-18 15:11:13 +0300
committerGitHub <noreply@github.com>2022-05-18 15:11:13 +0300
commita8bf2bc1c2f2d51c454c83f91eb590acbe23c0ed (patch)
treef32b08cf80c53433e65ae835e0ad848fd4bb3bd2
parentf8bcce9e3ca966ff894e5c2f9be6324db99e23ce (diff)
parent10f8c8ea002ad35b259e5f4cadb901793fe7bcb6 (diff)
Merge pull request #739 from steven-mathew/fix-flexsearch
fix(flexsearch): separate chain of calls into statements
-rw-r--r--assets/js/index.js13
1 files changed, 5 insertions, 8 deletions
diff --git a/assets/js/index.js b/assets/js/index.js
index b99ab90..f3d8da1 100644
--- a/assets/js/index.js
+++ b/assets/js/index.js
@@ -97,8 +97,8 @@ Source:
{{ $list := (where .Site.Pages "Section" "docs") -}}
{{ $len := (len $list) -}}
- index.add(
- {{ range $index, $element := $list -}}
+ {{ range $index, $element := $list -}}
+ index.add(
{
id: {{ $index }},
href: "{{ .RelPermalink }}",
@@ -109,12 +109,9 @@ Source:
description: {{ .Summary | plainify | jsonify }},
{{ end -}}
content: {{ .Plain | jsonify }}
- })
- {{ if ne (add $index 1) $len -}}
- .add(
- {{ end -}}
- {{ end -}}
- ;
+ }
+ );
+ {{ end -}}
search.addEventListener('input', show_results, true);