From 32dd3626b6d8efa4b1cbefc0077e737243fb18d4 Mon Sep 17 00:00:00 2001 From: Lars Tveito Date: Thu, 4 Aug 2016 18:09:14 +0200 Subject: [PATCH] Use org-export-get-reference for toc-id's Fixes issue raised in #10. --- ox-gfm.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ox-gfm.el b/ox-gfm.el index 2246d2f..db42b4e 100644 --- a/ox-gfm.el +++ b/ox-gfm.el @@ -238,9 +238,7 @@ plist used as a communication channel." (level (1- (org-element-property :level headline))) (indent (concat (make-string (* level 2) ? ))) (anchor (or (org-element-property :custom_id headline) - (concat "sec-" (mapconcat 'number-to-string - (org-export-get-headline-number - headline info) "-"))))) + (org-export-get-reference headline info)))) (concat indent "- [" title "]" "(#" anchor ")")))