ox-md.el: Add export-block
* ox-md.el (org-md-export-block): New function. (md): Use it.
This commit is contained in:
parent
096ff7e078
commit
83b7f49f38
|
@ -71,6 +71,7 @@ This variable can be set to either `atx' or `setext'."
|
||||||
(comment . (lambda (&rest args) ""))
|
(comment . (lambda (&rest args) ""))
|
||||||
(comment-block . (lambda (&rest args) ""))
|
(comment-block . (lambda (&rest args) ""))
|
||||||
(example-block . org-md-example-block)
|
(example-block . org-md-example-block)
|
||||||
|
(export-block . org-md-export-block)
|
||||||
(fixed-width . org-md-example-block)
|
(fixed-width . org-md-example-block)
|
||||||
(footnote-definition . ignore)
|
(footnote-definition . ignore)
|
||||||
(footnote-reference . ignore)
|
(footnote-reference . ignore)
|
||||||
|
@ -93,7 +94,6 @@ This variable can be set to either `atx' or `setext'."
|
||||||
(template . org-md-template)
|
(template . org-md-template)
|
||||||
(verbatim . org-md-verbatim)))
|
(verbatim . org-md-verbatim)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;;; Filters
|
;;; Filters
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ channel."
|
||||||
value)))
|
value)))
|
||||||
|
|
||||||
|
|
||||||
;;;; Example Block and Src Block
|
;;;; Example Block, Src Block and export Block
|
||||||
|
|
||||||
(defun org-md-example-block (example-block contents info)
|
(defun org-md-example-block (example-block contents info)
|
||||||
"Transcode EXAMPLE-BLOCK element into Markdown format.
|
"Transcode EXAMPLE-BLOCK element into Markdown format.
|
||||||
|
@ -153,6 +153,11 @@ channel."
|
||||||
(org-remove-indentation
|
(org-remove-indentation
|
||||||
(org-element-property :value example-block))))
|
(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
|
;;;; Headline
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue