Hi Thomas,

the attached (dirty) patch fixes it.  It's clearly not the right
approach, though.  I hope Nicolas can have a look soon, as the problem
affect all uses of snippets in macros.

Thanks for reporting this,

Changes in master
	Modified   lisp/ox-html.el
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 9307081..6750ffc 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -2024,8 +2024,9 @@ information."
   "Transcode a EXPORT-SNIPPET object from Org to HTML.
 CONTENTS is nil.  INFO is a plist holding contextual
 information."
-  (when (eq (org-export-snippet-backend export-snippet) 'html)
-    (org-element-property :value export-snippet)))
+  (if (eq (org-export-snippet-backend export-snippet) 'html)
+      (org-element-property :value export-snippet)
+    (if (< 0 (org-element-property :post-blank export-snippet)) " ")))
 
 ;;;; Export Block
 
	Modified   lisp/ox-latex.el
diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index fa66bb4..5362edf 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -1337,8 +1337,9 @@ CONTENTS is nil.  INFO is a plist holding contextual information."
 (defun org-latex-export-snippet (export-snippet contents info)
   "Transcode a EXPORT-SNIPPET object from Org to LaTeX.
 CONTENTS is nil.  INFO is a plist holding contextual information."
-  (when (eq (org-export-snippet-backend export-snippet) 'latex)
-    (org-element-property :value export-snippet)))
+  (if (eq (org-export-snippet-backend export-snippet) 'latex)
+      (org-element-property :value export-snippet)
+    (if (< 0 (org-element-property :post-blank export-snippet)) " ")))
 
 
 ;;;; Fixed Width

-- 
 Bastien

Reply via email to