From: David Maus <dmaus@ictsoc.de>
To: emacs-orgmode@gnu.org
Subject: [PATCH] Add support for multile html container classes.
Date: Thu, 29 Jul 2010 14:14:39 +0200 [thread overview]
Message-ID: <1280405679-8762-1-git-send-email-dmaus@ictsoc.de> (raw)
In-Reply-To: <AANLkTinTb1RiH89MVYESG03WWfDlf6nMkBR3_6xP2Y2m@mail.gmail.com>
* org-html.el (org-html-level-start): Add multiple container
classes.
* org-exp.el (org-export-remember-html-container-classes):
Parse multiple container classes.
---
lisp/org-exp.el | 7 ++++---
lisp/org-html.el | 11 ++++++++---
2 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index f1cea62..d3da4da 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -1311,11 +1311,12 @@ the current file."
(goto-char (point-min))
(let (class)
(while (re-search-forward
- "^[ \t]*:HTML_CONTAINER_CLASS:[ \t]+\\(\\S-+\\)" nil t)
- (setq class (match-string 1))
+ "^[ \t]*:HTML_CONTAINER_CLASS:[ \t]+\\(.+\\)$" nil t)
+ (setq class (org-split-string (match-string 1) "[ \t]+"))
(save-excursion
(org-back-to-heading t)
- (put-text-property (point-at-bol) (point-at-eol) 'html-container-class class)))))
+ (put-text-property
+ (point-at-bol) (point-at-eol) 'html-container-class class)))))
(defvar org-export-format-drawer-function nil
"Function to be called to format the contents of a drawer.
diff --git a/lisp/org-html.el b/lisp/org-html.el
index d972c58..28dd633 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -2177,9 +2177,12 @@ When TITLE is nil, just close all open levels."
(let* ((target (and title (org-get-text-property-any 0 'target title)))
(extra-targets (and target
(assoc target org-export-target-aliases)))
- (extra-class (and title (org-get-text-property-any 0 'html-container-class title)))
+ (extra-class
+ (and title
+ (org-get-text-property-any 0 'html-container-class title)))
(preferred (and target
- (cdr (assoc target org-export-preferred-target-alist))))
+ (cdr
+ (assoc target org-export-preferred-target-alist))))
(remove (or preferred target))
(l org-level-max)
snumber snu href suffix)
@@ -2244,7 +2247,9 @@ When TITLE is nil, just close all open levels."
(setq suffix (or href snu))
(setq href (or href (concat "sec-" snu)))
(insert (format "\n<div id=\"outline-container-%s\" class=\"outline-%d%s\">\n<h%d id=\"%s\">%s%s</h%d>\n<div class=\"outline-text-%d\" id=\"text-%s\">\n"
- suffix level (if extra-class (concat " " extra-class) "")
+ suffix level (if extra-class
+ (concat " "
+ (mapconcat 'identity extra-class " ")))
level href
extra-targets
title level level suffix))
--
1.7.1
next prev parent reply other threads:[~2010-07-29 12:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-06 20:12 Problem with HTML_CONTAINER_CLASS property Jan Janak
2010-07-07 7:20 ` David Maus
2010-07-29 12:14 ` David Maus [this message]
2010-07-31 9:31 ` [PATCH] Add support for multile html container classes Bastien
2010-08-01 8:58 ` David Maus
2010-08-01 9:33 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1280405679-8762-1-git-send-email-dmaus@ictsoc.de \
--to=dmaus@ictsoc.de \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.