Use org-export-get-reference for toc-id's

Fixes issue raised in #10.
This commit is contained in:
Lars Tveito 2016-08-04 18:09:14 +02:00
parent 437771130f
commit 32dd3626b6

View File

@ -238,9 +238,7 @@ plist used as a communication channel."
(level (1- (org-element-property :level headline))) (level (1- (org-element-property :level headline)))
(indent (concat (make-string (* level 2) ? ))) (indent (concat (make-string (* level 2) ? )))
(anchor (or (org-element-property :custom_id headline) (anchor (or (org-element-property :custom_id headline)
(concat "sec-" (mapconcat 'number-to-string (org-export-get-reference headline info))))
(org-export-get-headline-number
headline info) "-")))))
(concat indent "- [" title "]" "(#" anchor ")"))) (concat indent "- [" title "]" "(#" anchor ")")))