From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: extra paragraph in image export? Date: Tue, 24 Jan 2017 22:27:39 +0100 Message-ID: <87fuk86tdg.fsf@nicolasgoaziou.fr> References: <87lgu3b5c8.fsf@nicolasgoaziou.fr> <87sho8ztgv.fsf@gmx.us> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cW8cz-0005O8-Pf for emacs-orgmode@gnu.org; Tue, 24 Jan 2017 16:27:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cW8cw-0003dk-Mp for emacs-orgmode@gnu.org; Tue, 24 Jan 2017 16:27:45 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:47297) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cW8cw-0003dN-Fq for emacs-orgmode@gnu.org; Tue, 24 Jan 2017 16:27:42 -0500 In-Reply-To: <87sho8ztgv.fsf@gmx.us> (rasmus@gmx.us's message of "Tue, 24 Jan 2017 10:40:32 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Rasmus Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Hello, Rasmus writes: > I'm not an expert of HTML either. However, the "p" tag inside the > "figure" is uncommon looking a bit on the example usages online. Thus, I > agree with Matt that it should probably not be there. OK. > AFAIK, the CSS selector still differs so on the output side they are not > alike. I.e. the former is "figure>img" the other is a "p>img". Aside: If > anything, removing the "p" tag inside the figure would make it easier to > handle images. So would the following patch fix the issue? Regards, -- Nicolas Goaziou --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-ox-html-Remove-p-tag-around-block-images-when-using-.patch >From 49ebd5a8406bdee0c0a94b83f7135d94e35bb6ba Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Tue, 24 Jan 2017 22:22:47 +0100 Subject: [PATCH] ox-html: Remove

tag around block images when using HTML5 * lisp/ox-html.el (org-html--wrap-image): Do not add a spurious

tag when using

to mark images. --- lisp/ox-html.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index d3c1b2eb1..fa8476a05 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -1607,7 +1607,7 @@ arguments CAPTION and LABEL are given, use them for caption and ;; ID. (if (org-string-nw-p label) (format " id=\"%s\"" label) "") ;; Contents. - (format "\n

%s

" contents) + (if html5-fancy contents (format "\n

%s

" contents)) ;; Caption. (if (not (org-string-nw-p caption)) "" (format (if html5-fancy "\n
%s
" -- 2.11.0 --=-=-=--