Function: org-md-keyword
org-md-keyword is a byte-compiled function defined in ox-md.el.gz.
Signature
(org-md-keyword KEYWORD CONTENTS INFO)
Documentation
Transcode a KEYWORD element into Markdown format.
CONTENTS is nil. INFO is a plist used as a communication channel.
Source Code
;; Defined in /usr/src/emacs/lisp/org/ox-md.el.gz
;;;; Keyword
(defun org-md-keyword (keyword contents info)
"Transcode a KEYWORD element into Markdown format.
CONTENTS is nil. INFO is a plist used as a communication
channel."
(pcase (org-element-property :key keyword)
((or "MARKDOWN" "MD") (org-element-property :value keyword))
("TOC"
(let ((case-fold-search t)
(value (org-element-property :value keyword)))
(cond
((string-match-p "\\<headlines\\>" value)
(let ((depth (and (string-match "\\<[0-9]+\\>" value)
(string-to-number (match-string 0 value))))
(scope
(cond
((string-match ":target +\\(\".+?\"\\|\\S-+\\)" value) ;link
(org-export-resolve-link
(org-strip-quotes (match-string 1 value)) info))
((string-match-p "\\<local\\>" value) keyword)))) ;local
(org-remove-indentation
(org-md--build-toc info depth keyword scope)))))))
(_ (org-export-with-backend 'html keyword contents info))))