Browse Source

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.
Bastien 5 years ago
parent
commit
0c72a1c413
1 changed files with 9 additions and 6 deletions
  1. 9 6
      lisp/ox-html.el

+ 9 - 6
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))