all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH]: ox-deck
@ 2015-07-07 21:56 Matt Price
  2015-07-08 10:39 ` Rasmus
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Price @ 2015-07-07 21:56 UTC (permalink / raw)
  To: Org Mode


[-- Attachment #1.1: Type: text/plain, Size: 136 bytes --]

Do patches for contrib go to the list? this fixes export of checkbox list
items when they are part of a deck.js "build" within a slide.

[-- Attachment #1.2: Type: text/html, Size: 183 bytes --]

[-- Attachment #2: 0001-ox-deck-parse-checkboxes-properly.patch --]
[-- Type: text/x-patch, Size: 1526 bytes --]

From dacc39e25f86ddf0cfda5693a4ace3a26cf31e73 Mon Sep 17 00:00:00 2001
From: Matt Price <matt.price@utoronto.ca>
Date: Tue, 7 Jul 2015 17:53:03 -0400
Subject: [PATCH] ox-deck: parse checkboxes properly

*ox-deck.el
Previously, list items with checkboxes would not build properly. This
trivial and clumsy patch fixes that.
---
 contrib/lisp/ox-deck.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/ox-deck.el b/contrib/lisp/ox-deck.el
index 915373f..03d035c 100644
--- a/contrib/lisp/ox-deck.el
+++ b/contrib/lisp/ox-deck.el
@@ -366,7 +366,7 @@ holding export options."
   (concat contents "\n"))
 
 (defun org-deck-headline (headline contents info)
-  (let ((org-html-toplevel-hlevel 2)
+    (let ((org-html-toplevel-hlevel 2)
         (class (or (org-element-property :HTML_CONTAINER_CLASS headline) ""))
         (level (org-export-get-relative-level headline info)))
     (when (and (= 1 level) (not (string-match-p "\\<slide\\>" class)))
@@ -382,7 +382,10 @@ the \"slide\" class will be added to the to the list element,
  which will make the list into a \"build\"."
   (let ((text (org-html-item item contents info)))
     (if (org-export-get-node-property :STEP item t)
-        (replace-regexp-in-string "^<li>" "<li class='slide'>" text)
+	(progn
+	  (replace-regexp-in-string "^<li>" "<li class='slide'>" text)
+	  (replace-regexp-in-string "^<li class='checkbox'>" "<li class='checkbox slide'>" text)
+	  )
       text)))
 
 (defun org-deck-link (link desc info)
-- 
2.4.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH]: ox-deck
  2015-07-07 21:56 [PATCH]: ox-deck Matt Price
@ 2015-07-08 10:39 ` Rasmus
  0 siblings, 0 replies; 2+ messages in thread
From: Rasmus @ 2015-07-08 10:39 UTC (permalink / raw)
  To: emacs-orgmode

Matt Price <moptop99@gmail.com> writes:

> Do patches for contrib go to the list?

Sure.

> this fixes export of checkbox list
> items when they are part of a deck.js "build" within a slide.

Thanks.  Pushed.

Rasmus

-- 
El Rey ha muerto. ¡Larga vida al Rey!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-08 10:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-07 21:56 [PATCH]: ox-deck Matt Price
2015-07-08 10:39 ` Rasmus

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.