forked from mirrors/org-mode
Fix 464cd96
* lisp/ox-html.el (org-html-link):
* lisp/ox-md.el (org-md-link): Fix errors introduced in
464cd965cb
.
This commit is contained in:
parent
464cd965cb
commit
a526ee3b82
|
@ -2807,12 +2807,9 @@ INFO is a plist holding contextual information. See
|
|||
(org-element-property :raw-link link) info))))
|
||||
;; Link points to a headline.
|
||||
(headline
|
||||
(let ((href
|
||||
;; Headline linked via CUSTOM_ID.
|
||||
(or (and (string= type "custom-id")
|
||||
(org-element-property :CUSTOM_ID destination))
|
||||
(org-export-get-headline-id destination info)
|
||||
(t (error "Shouldn't reach here"))))
|
||||
(let ((href (or (and (string= type "custom-id")
|
||||
(org-element-property :CUSTOM_ID destination))
|
||||
(org-export-get-headline-id destination info)))
|
||||
;; What description to use?
|
||||
(desc
|
||||
;; Case 1: Headline is numbered and LINK has no
|
||||
|
|
|
@ -355,12 +355,13 @@ a communication channel."
|
|||
(when destination
|
||||
(let ((number (org-export-get-ordinal destination info)))
|
||||
(if number
|
||||
(if (atom number) (number-to-string number)
|
||||
(mapconcat #'number-to-string number "."))
|
||||
(if (atom number) (number-to-string number)
|
||||
(mapconcat #'number-to-string number "."))
|
||||
;; Unnumbered headline.
|
||||
(and (eq 'headline (org-element-type destination))
|
||||
;; BUG: shouldn't headlines have a form like [ref](name) in md?
|
||||
(org-export-data (org-element-property :title headline) info))))))))
|
||||
;; BUG: shouldn't headlines have a form like [ref](name) in md?
|
||||
(org-export-data
|
||||
(org-element-property :title destination) info))))))))
|
||||
;; Link type is handled by a special function.
|
||||
((let ((protocol (nth 2 (assoc type org-link-protocols))))
|
||||
(and (functionp protocol)
|
||||
|
|
Loading…
Reference in a new issue