fix(org): get right link href for file links

The following links should work well as external links in orgmode.
[[file:/Users/ll/Downloads/test.pdf]]
[[file:/Users/ll/Downloads/test.pdf][a pdf]]
This commit is contained in:
leizhe
2021-12-06 16:35:57 +08:00
committed by Tienson Qin
parent baa75f3361
commit ae7b373e98

View File

@@ -126,7 +126,9 @@
[url]
(match url
["File" s]
(string/replace s "file://" "")
(-> (string/replace s "file://" "")
;; "file:/Users/ll/Downloads/test.pdf" is a normal org file link
(string/replace "file:" ""))
["Complex" m]
(let [{:keys [link protocol]} m]