emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Price <moptop99@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: [PATCH]: ox-deck
Date: Tue, 7 Jul 2015 17:56:50 -0400	[thread overview]
Message-ID: <CAN_Dec-EGnGPZ3aVZjTQRUzr4HVVkXEjaU-B62zgZ14BC0yjPg@mail.gmail.com> (raw)


[-- 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


             reply	other threads:[~2015-07-07 21:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-07 21:56 Matt Price [this message]
2015-07-08 10:39 ` [PATCH]: ox-deck Rasmus

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAN_Dec-EGnGPZ3aVZjTQRUzr4HVVkXEjaU-B62zgZ14BC0yjPg@mail.gmail.com \
    --to=moptop99@gmail.com \
    --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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).