From 1b655ff4afe163798d91d35dc44c399e7cf6b45f Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 19 Dec 2008 12:46:46 +0100 Subject: [PATCH] Fix problem with
 of source code inside a paragraph.

---
 lisp/ChangeLog  | 2 ++
 lisp/org-exp.el | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0d3579109..f2ce31b2f 100755
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -2,6 +2,8 @@
 
 	* org-exp.el (org-export-html-format-image): Add the / to the end
 	of the  tag.
+	(org-export-format-source-code): Surround example by empty lines,
+	to make sure it will not be inside a paragraph.
 
 	* org.el (org-ido-switchb): New function.
 
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 9ef05249d..f961ffc4e 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -2260,9 +2260,9 @@ backends, it converts the segment into an EXAMPLE segment."
 		   (point-min) (point-max)))))
 	  (if (string-match "]*\\)>\n?" htmltext)
 	      (setq htmltext (replace-match
-			      (format "
" lang)
+			      (format "
\n" lang)
 			      t t htmltext)))
-	  (concat "#+BEGIN_HTML\n" htmltext "\n#+END_HTML\n"))))
+	  (concat "\n#+BEGIN_HTML\n" htmltext "\n#+END_HTML\n\n"))))
      (t
       ;; This is not HTML, so just make it an example.
       (when (equal lang "org")
-- 
2.11.4.GIT