Export: Fix XHTML validity problem with figure divs
This commit is contained in:
parent
852a86f446
commit
a9618e4e45
|
@ -1,3 +1,10 @@
|
||||||
|
2009-02-02 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
|
* org-exp.el (org-export-html-format-image): New argument
|
||||||
|
PAR-OPEN.
|
||||||
|
(org-export-as-html): Pass par-open to
|
||||||
|
`org-export-html-format-image'.
|
||||||
|
|
||||||
2009-02-01 Carsten Dominik <carsten.dominik@gmail.com>
|
2009-02-01 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
* org.el (org-yank-adjusted-subtrees, org-return-follows-link)
|
* org.el (org-yank-adjusted-subtrees, org-return-follows-link)
|
||||||
|
|
|
@ -3625,7 +3625,7 @@ lang=\"%s\" xml:lang=\"%s\">
|
||||||
(org-file-image-p
|
(org-file-image-p
|
||||||
path org-export-html-inline-image-extensions))
|
path org-export-html-inline-image-extensions))
|
||||||
(setq rpl (org-export-html-format-image
|
(setq rpl (org-export-html-format-image
|
||||||
(concat type ":" path)))
|
(concat type ":" path) org-par-open))
|
||||||
(setq link (concat type ":" path))
|
(setq link (concat type ":" path))
|
||||||
(setq rpl (concat "<a href=\""
|
(setq rpl (concat "<a href=\""
|
||||||
(org-export-html-format-href link)
|
(org-export-html-format-href link)
|
||||||
|
@ -3692,7 +3692,9 @@ lang=\"%s\" xml:lang=\"%s\">
|
||||||
(or (eq t org-export-html-inline-images)
|
(or (eq t org-export-html-inline-images)
|
||||||
(and org-export-html-inline-images
|
(and org-export-html-inline-images
|
||||||
(not descp))))
|
(not descp))))
|
||||||
(org-export-html-format-image thefile)
|
(progn
|
||||||
|
(message "image %s %s" thefile org-par-open)
|
||||||
|
(org-export-html-format-image thefile org-par-open))
|
||||||
(concat "<a href=\"" thefile "\"" attr ">"
|
(concat "<a href=\"" thefile "\"" attr ">"
|
||||||
(org-export-html-format-desc desc)
|
(org-export-html-format-desc desc)
|
||||||
"</a>")))
|
"</a>")))
|
||||||
|
@ -4019,7 +4021,7 @@ lang=\"%s\" xml:lang=\"%s\">
|
||||||
(org-html-do-expand s))
|
(org-html-do-expand s))
|
||||||
s))
|
s))
|
||||||
|
|
||||||
(defun org-export-html-format-image (src)
|
(defun org-export-html-format-image (src par-open)
|
||||||
"Create image tag with source and attributes."
|
"Create image tag with source and attributes."
|
||||||
(save-match-data
|
(save-match-data
|
||||||
(if (string-match "^ltxpng/" src)
|
(if (string-match "^ltxpng/" src)
|
||||||
|
@ -4027,15 +4029,18 @@ lang=\"%s\" xml:lang=\"%s\">
|
||||||
(let* ((caption (org-find-text-property-in-string 'org-caption src))
|
(let* ((caption (org-find-text-property-in-string 'org-caption src))
|
||||||
(attr (org-find-text-property-in-string 'org-attributes src))
|
(attr (org-find-text-property-in-string 'org-attributes src))
|
||||||
(label (org-find-text-property-in-string 'org-label src)))
|
(label (org-find-text-property-in-string 'org-label src)))
|
||||||
(format "<div %sclass=\"figure\">
|
(format "%s<div %sclass=\"figure\">
|
||||||
<p><img src=\"%s\"%s /></p>%s
|
<p><img src=\"%s\"%s /></p>%s
|
||||||
</div>"
|
</div>%s"
|
||||||
|
(if org-par-open "</p>\n" "")
|
||||||
(if label (format "id=\"%s\" " label) "")
|
(if label (format "id=\"%s\" " label) "")
|
||||||
src
|
src
|
||||||
(if (string-match "\\<alt=" (or attr ""))
|
(if (string-match "\\<alt=" (or attr ""))
|
||||||
(concat " " attr )
|
(concat " " attr )
|
||||||
(concat " " attr " alt=\"" src "\""))
|
(concat " " attr " alt=\"" src "\""))
|
||||||
(if caption (concat "\n<p>" caption "</p>") ""))))))
|
(if caption (concat "\n<p>" caption "</p>") "")
|
||||||
|
(if org-par-open "\n<p>" ""))))))
|
||||||
|
|
||||||
|
|
||||||
(defvar org-table-colgroup-info nil)
|
(defvar org-table-colgroup-info nil)
|
||||||
(defun org-format-table-ascii (lines)
|
(defun org-format-table-ascii (lines)
|
||||||
|
|
Loading…
Reference in New Issue