ox-md: Allow custom link type export function
* lisp/ox-md.el (org-md-link): Allow custom link type export function. `md' back-end is now on par with other core export back-ends. Thanks to Ken Markoff for reponting it. http://permalink.gmane.org/gmane.emacs.orgmode/90011
This commit is contained in:
parent
50da53de51
commit
b8b34eadb4
|
@ -294,7 +294,8 @@ a communication channel."
|
|||
(concat (file-name-sans-extension raw-path) ".md")
|
||||
raw-path))))
|
||||
(type (org-element-property :type link)))
|
||||
(cond ((member type '("custom-id" "id"))
|
||||
(cond
|
||||
((member type '("custom-id" "id"))
|
||||
(let ((destination (org-export-resolve-id-link link info)))
|
||||
(if (stringp destination) ; External file.
|
||||
(let ((path (funcall link-org-files-as-md destination)))
|
||||
|
@ -331,6 +332,10 @@ a communication channel."
|
|||
(when number
|
||||
(if (atom number) (number-to-string number)
|
||||
(mapconcat 'number-to-string number "."))))))))
|
||||
;; Link type is handled by a special function.
|
||||
((let ((protocol (nth 2 (assoc type org-link-protocols))))
|
||||
(and (functionp protocol)
|
||||
(funcall protocol (org-link-unescape path) desc 'md))))
|
||||
(t (let* ((raw-path (org-element-property :path link))
|
||||
(path
|
||||
(cond
|
||||
|
|
Loading…
Reference in New Issue