summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYue Zhu <yuezhu3@gmail.com>2018-04-20 10:49:44 -0400
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2018-04-21 10:59:47 +0200
commitc6e5aa1da877911d8bd69a8a521cd3b1731d9650 (patch)
tree47932a586946ddcc4ed00fdd478ffaaadcbeec56
parent14d3d59c44c63e82048e3d6424119f0fe8a64999 (diff)
downloadorg-mode-c6e5aa1da877911d8bd69a8a521cd3b1731d9650.tar.gz
ox-md: Fix ToC on unnumbered headings
(org-md--build-toc): When exporting markdown with ToC, if heading numbering is not enabled, ToC will be shown as an unordered list. TINYCHANGE
-rw-r--r--lisp/ox-md.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/ox-md.el b/lisp/ox-md.el
index c4da8fc..1c72eff 100644
--- a/lisp/ox-md.el
+++ b/lisp/ox-md.el
@@ -575,9 +575,9 @@ contents according to the current headline."
(make-string
(* 4 (1- (org-export-get-relative-level headline info)))
?\s))
- (number (format "%d."
- (org-last
- (org-export-get-headline-number headline info))))
+ (heading-number (org-last
+ (org-export-get-headline-number headline info)))
+ (number (if heading-number (format "%s." heading-number) "- "))
(bullet (concat number (make-string (- 4 (length number)) ?\s)))
(title
(format "[%s](#%s)"