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:
authorSteven Mathew <ste.tho.mat@gmail.com>2022-04-30 19:55:56 +0300
committerSteven Mathew <ste.tho.mat@gmail.com>2022-04-30 19:55:56 +0300
commit10f8c8ea002ad35b259e5f4cadb901793fe7bcb6 (patch)
tree08963f68f7f058a520ca7777626e1d42e6a6902e
parent7c834a5a11858f8eb47fca558d3eb620589f1275 (diff)
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);