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.
This commit is contained in:
Nicolas Goaziou 2011-08-08 20:21:41 +02:00
parent aab16ffdf4
commit 1b3798ea07

View file

@ -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")))))))))