From 9af2b1c96e2062b1501cb930a1e1f95ab8c0882e Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Mon, 23 Jun 2014 17:33:18 -0400 Subject: [PATCH 1/2] inhibit

wraps in list for all or none * lisp/ox-html.el (org-html-paragraph): Extend the special case of inhibiting

wrappers to only perform such inhibition when *every* element of the list is a single element long. Otherwise unsightly spacing results. --- lisp/ox-html.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 762e1dc..d95ce79 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -2956,7 +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))) + (org-element-property :contents-begin parent)) + ;; every subsequent list element is a single element long + (let ((gp (org-export-get-parent parent)) + (all-singles t)) + (org-element-map gp 'item + (lambda (object) + (let ((num-children (length (org-element-contents object)))) + (unless (= 1 num-children) + (setq all-singles nil)))) + info nil 'item) + all-singles)) ;; Leading paragraph in a list item have no tags. contents) ((org-html-standalone-image-p paragraph info) -- 2.0.0