hugo

Unnamed repository; edit this file 'description' to name the repository.

git clone git://git.shimmy1996.com/hugo.git
commit b984ec96bc21af4dad479e47fb758b90b91ceceb
parent c50780930e1f30dec3c0a5356a5b18d0dc67e4b9
Author: bep <bjorn.erik.pedersen@gmail.com>
Date:   Sat, 31 Jan 2015 23:45:38 +0100

Optimize for the common case in Blackfriday config

Diffstat:
Mhugolib/page.go | 13++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/hugolib/page.go b/hugolib/page.go
@@ -199,14 +199,17 @@ func (p *Page) getRenderingConfig() *helpers.Blackfriday {
 		pageParam := p.GetParam("blackfriday")
 		siteParam := viper.GetStringMap("blackfriday")
 
-		combinedParam := make(map[string]interface{})
-
-		for k, v := range siteParam {
-			combinedParam[k] = v
-		}
+		combinedParam := siteParam
 
 		if pageParam != nil {
+			combinedParam = make(map[string]interface{})
+
+			for k, v := range siteParam {
+				combinedParam[k] = v
+			}
+
 			pageConfig := cast.ToStringMap(pageParam)
+
 			for key, value := range pageConfig {
 				combinedParam[key] = value
 			}