From a526ee3b8276863ee562256f85f21aaba38c6f96 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Fri, 3 Oct 2014 22:23:25 +0200 Subject: [PATCH] Fix 464cd96 * lisp/ox-html.el (org-html-link): * lisp/ox-md.el (org-md-link): Fix errors introduced in 464cd965cb916b1ff60754226a3c2cc85b874abf. --- lisp/ox-html.el | 9 +++------ lisp/ox-md.el | 9 +++++---- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 765616379..2aae2a2b0 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -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 diff --git a/lisp/ox-md.el b/lisp/ox-md.el index 67b30afdb..9625948cf 100644 --- a/lisp/ox-md.el +++ b/lisp/ox-md.el @@ -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)