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
This commit is contained in:
Yue Zhu 2018-04-20 10:49:44 -04:00 committed by Nicolas Goaziou
parent 14d3d59c44
commit c6e5aa1da8
1 changed files with 3 additions and 3 deletions

View File

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