1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-12-11 09:20:32 +00:00

ox-html: Prefer custom ID for links in table of contents

* lisp/ox-html.el (org-html--format-toc-headline): Use custom ID when
  available.

Reported-by: Mitchel Humpherys <mitch.special@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/98797>
This commit is contained in:
Nicolas Goaziou 2015-07-01 14:49:42 +02:00
parent 9a04a1557c
commit e61bedadcb

View File

@ -2200,7 +2200,8 @@ INFO is a plist used as a communication channel."
(org-export-get-tags headline info))))
(format "<a href=\"#%s\">%s</a>"
;; Label.
(org-export-get-reference headline info)
(or (org-element-property :CUSTOM_ID headline)
(org-export-get-reference headline info))
;; Body.
(concat
(and (not (org-export-low-level-p headline info))