From 83b7f49f3896099793c05b06953215e65628dd9f Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Sat, 4 Jan 2014 19:20:23 +0100 Subject: [PATCH] ox-md.el: Add export-block * ox-md.el (org-md-export-block): New function. (md): Use it. --- lisp/ox-md.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ox-md.el b/lisp/ox-md.el index b6820db49..19f059d14 100644 --- a/lisp/ox-md.el +++ b/lisp/ox-md.el @@ -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