shithub: hugo

Download patch

ref: 5906c8652dfb63e9e54b718ea5787c7231816c12
parent: 3521e8b1e57feb7ff9625a7e8bc453e10ba11b9e
author: Owen Waller <[email protected]>
date: Mon Sep 22 13:49:39 EDT 2014

Fix: remove the unnecessary dot in an extension

Oops minor typo. The new extension passed to ReplaceExtension should
not have a dot in it. The test data bas been updated to reflect this.

--- a/helpers/path_test.go
+++ b/helpers/path_test.go
@@ -86,7 +86,7 @@
 		{"banana/pie/index.html", "xml", "index.xml"},
 		{"../pies/fish/index.html", "xml", "index.xml"},
 		// but these all fail
-		{"filename-without-ext", ".ext", "filename-without-an-ext.ext"},
+		{"filename-without-an-ext", "ext", "filename-without-an-ext.ext"},
 		{"/filename-without-an-ext", "ext", "filename-without-an-ext.ext"},
 		{"/directory/mydir/", "ext", ".ext"},
 		{"mydir/", "ext", ".ext"},