summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien <bzg@gnu.org>2020-02-11 09:26:20 +0100
committerBastien <bzg@gnu.org>2020-02-11 09:26:20 +0100
commit0c72a1c4138c5d65fe87cfe44b800f668cee1843 (patch)
treec8c6b8a5c2bb3cfbfce7e90e0420bd5859261009
parentd0cc865623b4e9fc6c47e6f8338de8e6bc0be854 (diff)
downloadorg-mode-0c72a1c4138c5d65fe87cfe44b800f668cee1843.tar.gz
ox-html.el: No trailing dot when HTML extension is empty
* lisp/ox-html.el (org-html-export-to-html) (org-html-publish-to-html): Don't add a trailing dot when HTML extension is empty.
-rw-r--r--lisp/ox-html.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index fa30bde..6948e9c 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -3864,9 +3864,11 @@ file-local settings.
Return output file's name."
(interactive)
- (let* ((extension (concat "." (or (plist-get ext-plist :html-extension)
- org-html-extension
- "html")))
+ (let* ((extension (concat
+ (when (> (length org-html-extension) 0) ".")
+ (or (plist-get ext-plist :html-extension)
+ org-html-extension
+ "html")))
(file (org-export-output-file-name extension subtreep))
(org-export-coding-system org-html-coding-system))
(org-export-to-file 'html file
@@ -3882,9 +3884,10 @@ publishing directory.
Return output file name."
(org-publish-org-to 'html filename
- (concat "." (or (plist-get plist :html-extension)
- org-html-extension
- "html"))
+ (concat (when (> (length org-html-extension) 0) ".")
+ (or (plist-get plist :html-extension)
+ org-html-extension
+ "html"))
plist pub-dir))