Browse Source

Fix bugs with new figure <div>.

Carsten Dominik 16 years ago
parent
commit
cf75cdb7f3
2 changed files with 4 additions and 3 deletions
  1. 2 0
      lisp/ChangeLog
  2. 2 3
      lisp/org-exp.el

+ 2 - 0
lisp/ChangeLog

@@ -1,5 +1,7 @@
 2008-12-10  Carsten Dominik  <carsten.dominik@gmail.com>
 
+	* org-exp.el (org-export-html-format-image): Fix bugs.
+
 	* org-export-latex.el (org-export-latex-tables)
 	(org-export-latex-links): Implement attribute, label, and caption
 	handling.

+ 2 - 3
lisp/org-exp.el

@@ -3716,15 +3716,14 @@ lang=\"%s\" xml:lang=\"%s\">
 	   (attr (org-find-text-property-in-string 'org-attributes src))
 	   (label (org-find-text-property-in-string 'org-label src)))
       (format "<div %sclass=\"figure\">
-<p><img src=\"%s\"%s>
-%s
+<p><img src=\"%s\"%s></p>%s
 </div>"
 	      (if label (format "id=\"%s\" " label) "")
 	      src
 	      (if (string-match "\\<alt=" (or attr ""))
 		  (concat " " attr )
 		(concat " " attr " alt=\"" src "\""))
-	      (if caption (concat "<p>" caption))))))
+	      (if caption (concat "\n<p>" caption "</p>") "")))))
 
 (defvar org-table-colgroup-info nil)
 (defun org-format-table-ascii (lines)