forked from mirrors/org-mode
ox-md: Tiny refactoring
* lisp/ox-md.el (org-md--build-toc): Tiny refactoring.
This commit is contained in:
parent
c6e5aa1da8
commit
5792f06871
|
@ -575,10 +575,13 @@ contents according to the current headline."
|
|||
(make-string
|
||||
(* 4 (1- (org-export-get-relative-level headline info)))
|
||||
?\s))
|
||||
(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)))
|
||||
(bullet
|
||||
(if (not (org-export-numbered-headline-p headline info)) "- "
|
||||
(let ((prefix
|
||||
(format "%d." (org-last (org-export-get-headline-number
|
||||
headline info)))))
|
||||
(concat prefix (make-string (max 1 (- 4 (length prefix)))
|
||||
?\s)))))
|
||||
(title
|
||||
(format "[%s](#%s)"
|
||||
(org-export-data-with-backend
|
||||
|
|
Loading…
Reference in New Issue