From bb30de44fd73148da435e0b724e200590a622159 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 24 Apr 2013 09:52:20 +0200 Subject: [PATCH] ox-html: Always use provided description in internal links * lisp/ox-html.el (org-html-link): Don't skip the link description when it matches the name of the headline it targets. --- lisp/ox-html.el | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 54c6a4524..ef7d15a10 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -2521,7 +2521,7 @@ INFO is a plist holding contextual information. See (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)) + (desc (org-string-nw-p desc)) (path (cond ((member type '("http" "https" "ftp" "mailto")) @@ -2625,12 +2625,9 @@ INFO is a plist holding contextual information. See ;; What description to use? (desc ;; Case 1: Headline is numbered and LINK has no - ;; description or LINK's description matches - ;; headline's title. Display section number. + ;; description. Display section number. (if (and (org-export-numbered-headline-p destination info) - (or (not desc) - (string= desc (org-element-property - :raw-value destination)))) + (not desc)) (mapconcat 'number-to-string (org-export-get-headline-number destination info) ".") -- 2.11.4.GIT