From a9fc8b67e12106aad4a125ed175f907caf4a4e4f Mon Sep 17 00:00:00 2001 From: Anders Johansson Date: Tue, 8 Sep 2020 18:53:46 +0200 Subject: [PATCH] Remove quote-block transcoder function The only reason for using this function is to add reveal fragment classes. However, these are already added as classes to :attr_html when the parse tree is filtered (`org-re-reveal-filter-parse-tree`, and `org-re-reveal-append-frag`). Removing the transcoder function enables other attributes (like cite) to be added with an `#+attr_html:` line, which will be parsed by `org-html-quote-block`. Add test for quote block --- Makefile | 2 +- org-re-reveal-tests.el | 1 + org-re-reveal.el | 15 ------ test-cases/expect-blockquote.html | 82 +++++++++++++++++++++++++++++++ test-cases/test-blockquote.org | 17 +++++++ 5 files changed, 101 insertions(+), 16 deletions(-) create mode 100644 test-cases/expect-blockquote.html create mode 100644 test-cases/test-blockquote.org diff --git a/Makefile b/Makefile index c9bee21..948d25c 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ ELS := org-re-reveal.el ox-re-reveal.el CORTELS := $(TESTFILE) cort-test.el -REVEALTEST := extra-scripts highlightjs internal-links klipsify klipsify-python multiplex noslide options pdf-notes reveal-toc revealjs4 slide-numbers slide-numbers-toc slide-numbers-reveal-toc split title-slide +REVEALTEST := extra-scripts highlightjs internal-links klipsify klipsify-python multiplex noslide options pdf-notes reveal-toc revealjs4 slide-numbers slide-numbers-toc slide-numbers-reveal-toc split title-slide blockquote ################################################## diff --git a/org-re-reveal-tests.el b/org-re-reveal-tests.el index 82ee974..14f0f95 100644 --- a/org-re-reveal-tests.el +++ b/org-re-reveal-tests.el @@ -142,6 +142,7 @@ "slide-numbers-toc" "split" "title-slide" + "blockquote" )) ;; (provide 'org-re-reveal-tests) diff --git a/org-re-reveal.el b/org-re-reveal.el index 92d4a43..7214e31 100644 --- a/org-re-reveal.el +++ b/org-re-reveal.el @@ -191,7 +191,6 @@ (setq info (plist-put info :reveal-mathjax t)) (org-html-latex-fragment frag contents info))) (plain-list . org-re-reveal-plain-list) - (quote-block . org-re-reveal-quote-block) (section . org-re-reveal-section) (src-block . org-re-reveal-src-block) (special-block . org-re-reveal-special-block) @@ -1986,20 +1985,6 @@ INFO is a plist holding contextual information. CONTENTS is unused." (org-re-reveal--frag-index findex) label code)))))))) -(defun org-re-reveal-quote-block (quote-block contents info) - "Transcode a QUOTE-BLOCK element from Org to Reveal. -CONTENTS holds the contents of the block INFO is a plist holding -contextual information." - (format "\n%s" - (let ((frag (org-re-reveal--frag-class - (org-export-read-attribute - :attr_reveal quote-block :frag) info))) - (if frag - (concat " " frag) - "")) - contents)) - - (defun org-re-reveal--auto-title-slide-template (info) "Generate the automatic title slide template with INFO." (let* ((spec (org-re-reveal-format-spec info)) diff --git a/test-cases/expect-blockquote.html b/test-cases/expect-blockquote.html new file mode 100644 index 0000000..7b0c4cf --- /dev/null +++ b/test-cases/expect-blockquote.html @@ -0,0 +1,82 @@ + + + + +Test blockquote + + + + + + + + + + +
+
+
+

Test blockquote

Anders Johansson

Created:{{date}}

+
+ +
+
+

1 Slide with quote

+
+

+Avian carriers can provide high delay, low throughput, and low altitude service. The connection topology is limited to a single point-to-point path for each carrier, used with standard carriers, but many carriers can be used without significant interference with each other, outside of early spring. This is because of the 3D ether space available to the carriers, in contrast to the 1D ether used by IEEE802.3. The carriers have an intrinsic collision avoidance system, which increases availability. +

+
+
+
+
+
+ + + + + diff --git a/test-cases/test-blockquote.org b/test-cases/test-blockquote.org new file mode 100644 index 0000000..cb97bce --- /dev/null +++ b/test-cases/test-blockquote.org @@ -0,0 +1,17 @@ +# Local IspellDict: en +# SPDX-License-Identifier: GPL-3.0-or-later +# Copyright (C) 2020 Anders Johansson + +#+OPTIONS: toc:nil reveal_width:1400 reveal_height:1000 +#+REVEAL_THEME: black + +#+Title: Test blockquote +#+Author: Anders Johansson + +* Slide with quote + +#+attr_html: :cite https://tools.ietf.org/html/rfc1149 +#+attr_reveal: :frag t +#+begin_quote +Avian carriers can provide high delay, low throughput, and low altitude service. The connection topology is limited to a single point-to-point path for each carrier, used with standard carriers, but many carriers can be used without significant interference with each other, outside of early spring. This is because of the 3D ether space available to the carriers, in contrast to the 1D ether used by IEEE802.3. The carriers have an intrinsic collision avoidance system, which increases availability. +#+end_quote -- GitLab