|
@@ -638,21 +638,15 @@ CONTENTS is nil. INFO is a plist holding contextual information."
|
|
|
DESC is the description part of the link, or the empty string.
|
|
|
INFO is a plist holding contextual information. See
|
|
|
`org-export-data'."
|
|
|
-
|
|
|
(let* ((type (org-element-property :type link))
|
|
|
(raw-path (org-element-property :path link))
|
|
|
;; Ensure DESC really exists, or set it to nil.
|
|
|
(desc (and (not (string= desc "")) desc))
|
|
|
-
|
|
|
(path (cond
|
|
|
((member type '("http" "https" "ftp" "mailto"))
|
|
|
(concat type ":" raw-path))
|
|
|
- ((string= type "file")
|
|
|
- (when (string-match "\\(.+\\)::.+" raw-path)
|
|
|
- (setq raw-path (match-string 1 raw-path)))
|
|
|
- (if (file-name-absolute-p raw-path)
|
|
|
- (concat "file://" (expand-file-name raw-path))
|
|
|
- (concat "file://" raw-path)))
|
|
|
+ ((and (string= type "file") (file-name-absolute-p raw-path))
|
|
|
+ (concat "file:" raw-path))
|
|
|
(t raw-path)))
|
|
|
protocol)
|
|
|
(cond
|