ox-md.el: Add export-block

* ox-md.el (org-md-export-block): New function.
(md): Use it.
This commit is contained in:
Bastien Guerry 2014-01-04 19:20:23 +01:00
parent 096ff7e078
commit 83b7f49f38
1 changed files with 7 additions and 2 deletions

View File

@ -71,6 +71,7 @@ This variable can be set to either `atx' or `setext'."
(comment . (lambda (&rest args) ""))
(comment-block . (lambda (&rest args) ""))
(example-block . org-md-example-block)
(export-block . org-md-export-block)
(fixed-width . org-md-example-block)
(footnote-definition . ignore)
(footnote-reference . ignore)
@ -93,7 +94,6 @@ This variable can be set to either `atx' or `setext'."
(template . org-md-template)
(verbatim . org-md-verbatim)))
;;; Filters
@ -142,7 +142,7 @@ channel."
value)))
;;;; Example Block and Src Block
;;;; Example Block, Src Block and export Block
(defun org-md-example-block (example-block contents info)
"Transcode EXAMPLE-BLOCK element into Markdown format.
@ -153,6 +153,11 @@ channel."
(org-remove-indentation
(org-element-property :value example-block))))
(defun org-md-export-block (export-block contents info)
"Transcode a EXPORT-BLOCK element from Org to Markdown.
CONTENTS is nil. INFO is a plist holding contextual information."
(when (equal (org-element-property :type export-block) "MD")
(org-remove-indentation (org-element-property :value export-block))))
;;;; Headline