11module FlexSearch
2- import Gumbo, JSON, AbstractTrees
2+
3+ using Gumbo: Gumbo
4+ using JSON: JSON
5+ using AbstractTrees: AbstractTrees
36using NodeJS_22_jll: node
4- using HypertextLiteral
7+ using HypertextLiteral: @htl
8+
59import .. walk_outputs
610
711const ID = Ref (0 )
@@ -62,7 +66,7 @@ function add_fragment(doc, el)
6266 current. content = string (current. content, ' ' , Gumbo. text (e))
6367 end
6468 end
65- return
69+ return nothing
6670end
6771
6872function add_to_index! (index, ref, file)
@@ -84,7 +88,7 @@ function add_to_index!(index, ref, file)
8488 end
8589 end
8690 push! (index. documents, doc)
87- return
91+ return nothing
8892end
8993
9094function generate_index (root, docs, config, rootpath)
@@ -104,12 +108,12 @@ function inject_script!(custom_scripts, rootpath)
104108 custom_scripts,
105109 Docs. HTML (" window.MULTIDOCUMENTER_ROOT_PATH = '$(rootpath) '" ),
106110 )
107- return
111+ return nothing
108112end
109113
110114function inject_styles! (custom_styles)
111115 pushfirst! (custom_styles, joinpath (" assets" , " default" , " flexsearch.css" ))
112- return
116+ return nothing
113117end
114118
115119function render ()
@@ -147,7 +151,7 @@ function to_json_index(index::SearchIndex, file)
147151 end
148152 JSON. end_array (writer)
149153 end
150- return
154+ return nothing
151155end
152156
153157function build_search_index (root, docs, config, rootpath)
@@ -159,6 +163,6 @@ function build_search_index(root, docs, config, rootpath)
159163 cd (root) do
160164 run (` $(node ()) $(joinpath (@__DIR__ , " .." , " .." , " flexsearch" , file)) ` )
161165 end
162- return
166+ return nothing
163167end
164168end
0 commit comments