소스 검색

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.
Nicolas Goaziou 13 년 전
부모
커밋
1b3798ea07
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      lisp/org-inlinetask.el

+ 5 - 0
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")))))))))