mirror of https://github.com/yjwen/org-reveal.git
Fix the bug of speaker notes.
This commit is contained in:
parent
87238c7917
commit
bf5a52869b
30
ox-reveal.el
30
ox-reveal.el
|
@ -303,16 +303,6 @@ can be include."
|
|||
(defun if-format (fmt val)
|
||||
(if val (format fmt val) ""))
|
||||
|
||||
(defun org-reveal-tag (tagname attrs content &optional sep)
|
||||
"Generate an HTML tag of form <TAGNAME ATTRS>CONTENT</TAGNAME>. If
|
||||
SEP is given, then the CONTENT is enclosed by SEP, otherwise it is enclosed by
|
||||
a '\\n'"
|
||||
(let ((sep_ (or sep "\n")))
|
||||
(format "<%s %s>%s%s%s</%s>"
|
||||
tagname ; The leading tagname.
|
||||
(if attrs (org-html--make-attribute-string attrs) "")
|
||||
sep_ content sep_ tagname)))
|
||||
|
||||
(defun frag-style (frag info)
|
||||
"Return proper fragment string according to FRAG and the default fragment style.
|
||||
FRAG is the fragment style set on element, INFO is a plist
|
||||
|
@ -337,8 +327,8 @@ CONTENTS is nil. INFO is a plist holding contextual information."
|
|||
(let ((block-type (org-element-property :type export-block))
|
||||
(block-string (org-element-property :value export-block)))
|
||||
(cond ((string= block-type "NOTES")
|
||||
(org-reveal-tag 'aside '(('class . 'notes))
|
||||
(org-export-string-as block-string 'html 'body-only)))
|
||||
(format "<aside class=\"notes\">\n%s\n</aside>\n"
|
||||
(org-export-string-as block-string 'html 'body-only)))
|
||||
((string= block-type "HTML")
|
||||
(org-remove-indentation block-string)))))
|
||||
|
||||
|
@ -684,12 +674,16 @@ CONTENTS is the contents of the list. INFO is a plist holding
|
|||
contextual information.
|
||||
|
||||
Extract and set `attr_html' to plain-list tag attributes."
|
||||
(org-reveal-tag (case (org-element-property :type plain-list)
|
||||
(ordered "ol")
|
||||
(unordered "ul")
|
||||
(descriptive "dl"))
|
||||
(org-export-read-attribute :attr_html plain-list)
|
||||
contents))
|
||||
(let ((tag (case (org-element-property :type plain-list)
|
||||
(ordered "ol")
|
||||
(unordered "ul")
|
||||
(descriptive "dl")))
|
||||
(attrs (org-export-read-attribute :attr_html plain-list)))
|
||||
(format "<%s%s>\n%s\n</%s>\n"
|
||||
tag
|
||||
(if attrs (org-html--make-attribute-string attrs) "")
|
||||
contents
|
||||
tag)))
|
||||
|
||||
(defun org-reveal--build-pre/postamble (type info)
|
||||
"Return document preamble or postamble as a string, or nil."
|
||||
|
|
Loading…
Reference in New Issue