Skip to content

Commit c332495

Browse files
committed
fix docset db index to not have leading slash (for zeal)
1 parent b0ed598 commit c332495

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/sitegen/docset.cljs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@
9595
(.run (.prepare db "CREATE UNIQUE INDEX anchor ON searchIndex (name, type, path)"))
9696
(let [insert (.prepare db "INSERT INTO searchIndex(name, type, path) VALUES (?, ?, ?)")]
9797
(doseq [e (docset-entries)]
98-
(.run insert (:name e) (:type e) (:path e))))
98+
(let [fix-path #(.slice % 1)] ;; remove leading slash (zeal needs this)
99+
(.run insert (:name e) (:type e) (fix-path (:path e))))))
99100
(.close db)))
100101

101102
;;-----------------------------------------------------------------------------

0 commit comments

Comments
 (0)