From 1b3798ea071cdb79479e33c4e7ce4478a3c86b3c Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 8 Aug 2011 20:21:41 +0200 Subject: [PATCH] org-inlinetask: fix HTML export when not clearly defined as a paragraph * lisp/org-inlinetask.el (org-inlinetask-export-handler): make sure the task starts a paragraph or the HTML exporter will produce an incorrect output. --- lisp/org-inlinetask.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lisp/org-inlinetask.el b/lisp/org-inlinetask.el index 7a52d6b6b..270b99af2 100644 --- a/lisp/org-inlinetask.el +++ b/lisp/org-inlinetask.el @@ -372,6 +372,11 @@ Either remove headline and meta data, or do special formatting." (eval (append '(format format-str) (mapcar nil-to-str tokens))) '(original-indentation 1000)))) + ;; Ensure task starts a new paragraph. + (unless (or (bobp) + (save-excursion (forward-line -1) + (looking-at "[ \t]*$"))) + (insert "\n")) (insert export-str) (unless (bolp) (insert "\n")))))))))