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.
This commit is contained in:
Bastien 2020-02-11 09:26:20 +01:00
parent d0cc865623
commit 0c72a1c413
1 changed files with 9 additions and 6 deletions

View File

@ -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))