diff options
author | Rick Frankel <rick@rickster.com> | 2014-04-16 13:39:20 -0400 |
---|---|---|
committer | Rick Frankel <github@rickster.com> | 2014-04-16 21:10:34 -0400 |
commit | 8d20a8419fd711c66d77f0258903e735c113bffe (patch) | |
tree | 013a7cfbc4c9e56a265627587866c6190475b6c2 | |
parent | 93ff3e5cb7a24dffc1559cefd6996d3457683e33 (diff) | |
download | org-mode-8d20a8419fd711c66d77f0258903e735c113bffe.tar.gz |
Add classes to checkbox list elements.
* lisp/ox-html.el (org-html-format-list-item): Add the appropriate
class `on', `off' or `trans' (the tri-state checkbox types) to the
list elements in checkbox lists.
-rw-r--r-- | lisp/ox-html.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 2665d02..8379fb2 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -2486,7 +2486,8 @@ INFO is a plist holding contextual information. See &optional term-counter-id headline) "Format a list item into HTML." - (let ((checkbox (concat (org-html-checkbox checkbox info) + (let ((class (symbol-name checkbox)) + (checkbox (concat (org-html-checkbox checkbox info) (and checkbox " "))) (br (org-html-close-tag "br" nil info))) (concat @@ -2495,20 +2496,20 @@ INFO is a plist holding contextual information. See (let* ((counter term-counter-id) (extra (if counter (format " value=\"%s\"" counter) ""))) (concat - (format "<li%s>" extra) + (format "<li class=\"%s\"%s>" class extra) (when headline (concat headline br))))) (unordered (let* ((id term-counter-id) (extra (if id (format " id=\"%s\"" id) ""))) (concat - (format "<li%s>" extra) + (format "<li class=\"%s\"%s>" class extra) (when headline (concat headline br))))) (descriptive (let* ((term term-counter-id)) (setq term (or term "(no term)")) ;; Check-boxes in descriptive lists are associated to tag. - (concat (format "<dt> %s </dt>" - (concat checkbox term)) + (concat (format "<dt class=\"%s\">%s</dt>" + class (concat checkbox term)) "<dd>")))) (unless (eq type 'descriptive) checkbox) contents |