summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2014-06-23 17:33:18 -0400
committerEric Schulte <schulte.eric@gmail.com>2014-06-23 20:08:09 -0400
commit1c3bdbb80a143664ca719a8a8b439390c42e28a2 (patch)
tree036cc3d6c396b097f42089d5dda61282373ffd7d
parent518b60aa4274025a7e8fe76b4a49051852bfcf74 (diff)
downloadorg-mode-1c3bdbb80a143664ca719a8a8b439390c42e28a2.tar.gz
inhibit <p> wraps on a whole-list basis
* lisp/ox-html.el (org-html-paragraph): Extend the special case of inhibiting <p> wrappers to only perform such inhibition when *every* element of the list is a single paragraph long. Otherwise unsightly spacing results.
-rw-r--r--lisp/ox-html.el13
1 files changed, 11 insertions, 2 deletions
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 762e1dc..df392a9 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -2956,8 +2956,17 @@ the plist used as a communication channel."
(cond
((and (eq (org-element-type parent) 'item)
(= (org-element-property :begin paragraph)
- (org-element-property :contents-begin parent)))
- ;; Leading paragraph in a list item have no tags.
+ (org-element-property :contents-begin parent))
+ (not (org-element-map (org-export-get-parent parent) 'item
+ (lambda (item)
+ (let ((contents (org-element-contents item)))
+ (and contents
+ (or (cdr contents)
+ (not (eq (org-element-type (car contents))
+ 'paragraph))))))
+ info 'first-match 'item)))
+ ;; Leading paragraph in a list item have no tags if every
+ ;; element of the containing list is only a single paragraph.
contents)
((org-html-standalone-image-p paragraph info)
;; Standalone image.