From 4e3cc6d4fd897be2b49a77823301426d6750557b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Gonz=C3=A1lez=20Sotillo?= Date: Mon, 30 May 2016 21:21:56 +0200 Subject: [PATCH 1/2] REVEAL_INIT_SCRIPT didn't work if reveal_single_file was set :reveal-init-script should be included even if in-single-file is set --- ox-reveal.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ox-reveal.el b/ox-reveal.el index ce1c95e..f793def 100644 --- a/ox-reveal.el +++ b/ox-reveal.el @@ -684,9 +684,9 @@ dependencies: [ (append (list extra-codes) builtin-codes)))) (mapconcat 'identity total-codes ",\n")) "]\n" + )) (let ((init-script (plist-get info :reveal-init-script))) - (if init-script (concat "," init-script))) - )) + (if init-script (concat (if in-single-file "" ",") init-script))) "});\n\n"))) (defun org-reveal-toc (depth info) From c71f293be24800489a94d1c42c883d95ed7c241a Mon Sep 17 00:00:00 2001 From: Emil Vatai Date: Fri, 17 Jun 2016 10:43:09 +0200 Subject: [PATCH 2/2] Add attributes to the tag Added the possibility to add attributes to the code tag for code blocks which make the following code export with the highlighting as described in: https://github.com/hakimel/reveal.js/#code-syntax-highlighting Example code: #+ATTR_REVEAL: :code_attribs data-noescape #+BEGIN_SRC python def implies(X,Y): return (not X) or Y #+END_SRC --- ox-reveal.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ox-reveal.el b/ox-reveal.el index 9e262cc..1dbb8b3 100644 --- a/ox-reveal.el +++ b/ox-reveal.el @@ -923,6 +923,8 @@ contextual information." #'buffer-substring)) (org-html-format-code src-block info)))) (frag (org-export-read-attribute :attr_reveal src-block :frag)) + (code-attribs (or (org-export-read-attribute + :attr_reveal src-block :code_attribs) "")) (label (let ((lbl (org-element-property :name src-block))) (if (not lbl) "" (format " id=\"%s\"" lbl))))) @@ -937,9 +939,9 @@ contextual information." (format "" (org-export-data caption info))) (if use-highlight - (format "\n%s" + (format "\n%s" (or (frag-class frag info) "") - label lang code) + label lang code-attribs code) (format "\n
%s
" (or (frag-class frag info) (format " class=\"src src-%s\"" lang))