mirror of https://github.com/yjwen/org-reveal.git
Fix crashing when source block has no language specified
- Wrong parenthese accidentally cause the logic completely different and wrong.
This commit is contained in:
parent
ea8b502170
commit
720b1bc78d
31
ox-reveal.el
31
ox-reveal.el
|
@ -1007,11 +1007,10 @@ contextual information."
|
||||||
((string= lang "scheme") "selector_eval_scheme")
|
((string= lang "scheme") "selector_eval_scheme")
|
||||||
((string= lang "ruby") "selector_eval_ruby")
|
((string= lang "ruby") "selector_eval_ruby")
|
||||||
((string= lang "html") "selector_eval_html"))
|
((string= lang "html") "selector_eval_html"))
|
||||||
)
|
))
|
||||||
)
|
|
||||||
(if (not lang)
|
(if (not lang)
|
||||||
(format "<pre %s%s%s>\n%s</pre>"
|
(format "<pre %s%s>\n%s</pre>"
|
||||||
(or (frag-class src-block info) " class=\"example\""))
|
(or (frag-class src-block info) " class=\"example\"")
|
||||||
label
|
label
|
||||||
code)
|
code)
|
||||||
(if klipsify
|
(if klipsify
|
||||||
|
@ -1040,18 +1039,18 @@ window.klipse_settings = { " langselector ": \".klipse\" };
|
||||||
'>
|
'>
|
||||||
</iframe>")
|
</iframe>")
|
||||||
(format
|
(format
|
||||||
"<div class=\"org-src-container\">\n%s%s\n</div>"
|
"<div class=\"org-src-container\">\n%s%s\n</div>"
|
||||||
(if (not caption) ""
|
(if (not caption) ""
|
||||||
(format "<label class=\"org-src-name\">%s</label>"
|
(format "<label class=\"org-src-name\">%s</label>"
|
||||||
(org-export-data caption info)))
|
(org-export-data caption info)))
|
||||||
(if use-highlight
|
(if use-highlight
|
||||||
(format "\n<pre%s%s><code class=\"%s\" %s>%s</code></pre>"
|
(format "\n<pre%s%s><code class=\"%s\" %s>%s</code></pre>"
|
||||||
(or (frag-class src-block info) "")
|
(or (frag-class src-block info) "")
|
||||||
label lang code-attribs code)
|
label lang code-attribs code)
|
||||||
(format "\n<pre %s%s><code trim>%s</code></pre>"
|
(format "\n<pre %s%s><code trim>%s</code></pre>"
|
||||||
(or (frag-class src-block info)
|
(or (frag-class src-block info)
|
||||||
(format " class=\"src src-%s\"" lang))
|
(format " class=\"src src-%s\"" lang))
|
||||||
label code)))))))
|
label code))))))))
|
||||||
|
|
||||||
(defun org-reveal-quote-block (quote-block contents info)
|
(defun org-reveal-quote-block (quote-block contents info)
|
||||||
"Transcode a QUOTE-BLOCK element from Org to Reveal.
|
"Transcode a QUOTE-BLOCK element from Org to Reveal.
|
||||||
|
|
Loading…
Reference in New Issue