(feat): support fuzzy links (#910)

This commit is contained in:
Jethro Kuan
2020-08-05 20:52:27 +08:00
committed by GitHub
parent f18ecd1fc3
commit da6fdd7542
5 changed files with 269 additions and 13 deletions

View File

@ -259,6 +259,24 @@
`(["e84d0630-efad-4017-9059-5ef917908823" ,(test-org-roam--abs-path "headlines/headline.org")]
["801b58eb-97e2-435f-a33e-ff59a2f0c213" ,(test-org-roam--abs-path "headlines/headline.org")])))))
(describe "Test fuzzy links"
(it "title"
(expect (org-roam--split-fuzzy-link "title")
:to-equal
'("title" nil "")))
(it "title*"
(expect (org-roam--split-fuzzy-link "title*")
:to-equal
'("title" t "")))
(it "title*headline"
(expect (org-roam--split-fuzzy-link "title*headline")
:to-equal
'("title" t "headline")))
(it "*headline"
(expect (org-roam--split-fuzzy-link "*headline")
:to-equal
'("" t "headline"))))
;;; Tests
(xdescribe "org-roam-db-build-cache"
(before-each