From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Is it possible to add a class to a paragraph in HTML export? Date: Wed, 02 Apr 2014 09:06:48 +0200 Message-ID: <87fvlwnrav.fsf@gmail.com> References: <20140401212850.157255d1@aga-netbook> <8761msdeot.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50456) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVFFh-0003js-Eq for emacs-orgmode@gnu.org; Wed, 02 Apr 2014 03:06:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVFFb-0000hx-RL for emacs-orgmode@gnu.org; Wed, 02 Apr 2014 03:06:25 -0400 In-Reply-To: <8761msdeot.fsf@bzg.ath.cx> (Bastien's message of "Tue, 01 Apr 2014 21:37:06 +0200") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: Org-mode mailing list , Marcin Borkowski Hello, Bastien writes: > + (class0 (org-export-read-attribute :attr_html paragraph :class)) > + (class (if class0 (format " class=\"%s\"" class0))) > (extra (or (cadr (assoc parent-type style)) ""))) > (cond > ((and (eq (org-element-type parent) 'item) > @@ -2925,7 +2927,7 @@ 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 "\n%s

" extra contents))))) > + (t (format "\n%s

" class extra contents))))) If deemed useful, I think this patch should use `org-html--make-attribute-string' instead of hard-coding "class" attribute: (attributes (org-html--make-attribute-string (org-export-read-attribute :attr_html paragraph))) ... (t (format "\n%s

" attributes extra contents)) This way, attributes will not be limited to "class" only. See, for example, `org-html-special-block'. Regards, -- Nicolas Goaziou