Ver Fonte

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>
Nicolas Goaziou há 9 anos atrás
pai
commit
e61bedadcb
1 ficheiros alterados com 2 adições e 1 exclusões
  1. 2 1
      lisp/ox-html.el

+ 2 - 1
lisp/ox-html.el

@@ -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))