mirror of https://github.com/yjwen/org-reveal.git
Extract local file name from script URL
This commit is contained in:
parent
3f5ae4df8a
commit
fed9be1f4c
19
ox-reveal.el
19
ox-reveal.el
|
@ -746,15 +746,16 @@ dependencies: [
|
||||||
file name. If in single file mode, the <script> tag encloses the
|
file name. If in single file mode, the <script> tag encloses the
|
||||||
contents of the file, otherwise it is a tag pointing to the file"
|
contents of the file, otherwise it is a tag pointing to the file"
|
||||||
(if in-single-file
|
(if in-single-file
|
||||||
(if (file-readable-p fname)
|
(let ((local-fname (org-reveal--file-url-to-path fname)))
|
||||||
;; Embed script into HTML
|
(if (file-readable-p local-fname)
|
||||||
(concat "<script>\n"
|
;; Embed script into HTML
|
||||||
(org-reveal--read-file fname)
|
(concat "<script>\n"
|
||||||
"\n</script>\n")
|
(org-reveal--read-file local-fname)
|
||||||
;; Cannot read fname, just error out
|
"\n</script>\n")
|
||||||
(error (concat "Cannot generate single file presentation due to "
|
;; Cannot read fname, just error out
|
||||||
fname
|
(error (concat "Cannot generate single file presentation due to "
|
||||||
" is not readable")))
|
local-fname
|
||||||
|
" is not readable"))))
|
||||||
(format "<script src=\"%s\"></script>\n" fname)))
|
(format "<script src=\"%s\"></script>\n" fname)))
|
||||||
|
|
||||||
(defun org-reveal--script-tags-by-auto-file-names (fnames in-single-file)
|
(defun org-reveal--script-tags-by-auto-file-names (fnames in-single-file)
|
||||||
|
|
Loading…
Reference in New Issue