Browse Source

Process html attributes on paragraphs.

* lisp/ox-html.el (org-html-paragraph): Add processed html attributes
  to paragraph tag.
Rick Frankel 11 years ago
parent
commit
93ff3e5cb7
1 changed files with 6 additions and 1 deletions
  1. 6 1
      lisp/ox-html.el

+ 6 - 1
lisp/ox-html.el

@@ -2902,6 +2902,8 @@ the plist used as a communication channel."
   (let* ((parent (org-export-get-parent paragraph))
 	 (parent-type (org-element-type parent))
 	 (style '((footnote-definition " class=\"footpara\"")))
+	 (attributes (org-html--make-attribute-string
+		      (org-export-read-attribute :attr_html paragraph)))
 	 (extra (or (cadr (assoc parent-type style)) "")))
     (cond
      ((and (eq (org-element-type parent) 'item)
@@ -2928,7 +2930,10 @@ the plist used as a communication channel."
 	    (label (org-element-property :name paragraph)))
 	(org-html--wrap-image contents info caption label)))
      ;; Regular paragraph.
-     (t (format "<p%s>\n%s</p>" extra contents)))))
+     (t (format "<p%s%s>\n%s</p>"
+		(if (org-string-nw-p attributes)
+		    (concat " " attributes) "")
+		extra contents)))))
 
 ;;;; Plain List