mirror of
https://github.com/logseq/logseq.git
synced 2026-05-01 17:36:33 +00:00
feat: support org mode file links (#681)
* feat: support org-mode file links Add a `:org-mode/insert-file-links` option to configuration.
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
(let [page (cond
|
||||
(and (vector? block) (= "Link" (first block)))
|
||||
(let [typ (first (:url (second block)))]
|
||||
;; {:url ["File" "file:../pages/hello_world.org"], :label [["Plain" "hello world"]], :title nil}
|
||||
(or
|
||||
(and
|
||||
(= typ "Search")
|
||||
@@ -40,7 +41,11 @@
|
||||
(and
|
||||
(= typ "Complex")
|
||||
(= (:protocol (second (:url (second block)))) "file")
|
||||
(:link (second (:url (second block)))))))
|
||||
(:link (second (:url (second block)))))
|
||||
|
||||
(and
|
||||
(= typ "File")
|
||||
(second (first (:label (second block)))))))
|
||||
|
||||
(and (vector? block) (= "Nested_link" (first block)))
|
||||
(let [content (:content (last block))]
|
||||
|
||||
Reference in New Issue
Block a user