shithub: hugo

Download patch

ref: d8923eb676101aeec3e2789aa13e9dc2bb13a8bb
parent: d6093aba4d0b74804378013c2326deb3cca58d7e
author: Bjørn Erik Pedersen <[email protected]>
date: Wed Mar 15 04:04:52 EDT 2017

Update to new go-toml API

Closes #3142

--- a/parser/frontmatter.go
+++ b/parser/frontmatter.go
@@ -52,12 +52,13 @@
 		return err
 
 	case rune(TOMLLead[0]):
-		tree := toml.TreeFromMap(in.(map[string]interface{}))
-		b := []byte(tree.String())
+		tree, err := toml.TreeFromMap(in.(map[string]interface{}))
+		if err != nil {
+			return err
+		}
 
-		_, err := w.Write(b)
+		_, err = tree.WriteTo(w)
 		return err
-
 	case rune(JSONLead[0]):
 		b, err := json.MarshalIndent(in, "", "   ")
 		if err != nil {
@@ -107,6 +108,7 @@
 		}
 
 		err = InterfaceToConfig(in, mark, w)
+
 		if err != nil {
 			return err
 		}
--- a/vendor/vendor.json
+++ b/vendor/vendor.json
@@ -208,16 +208,16 @@
 			"revisionTime": "2016-07-26T15:08:25Z"
 		},
 		{
-			"checksumSHA1": "8Y05Pz7onrQPcVWW6JStSsYRh6E=",
+			"checksumSHA1": "F1IYMLBLAZaTOWnmXsgaxTGvrWI=",
 			"path": "github.com/pelletier/go-buffruneio",
-			"revision": "df1e16fde7fc330a0ca68167c23bf7ed6ac31d6d",
-			"revisionTime": "2016-01-24T19:35:03Z"
+			"revision": "c37440a7cf42ac63b919c752ca73a85067e05992",
+			"revisionTime": "2017-02-27T22:03:11Z"
 		},
 		{
-			"checksumSHA1": "Ur3oHB8hzTudM8y0xHRoUXAf0IY=",
+			"checksumSHA1": "JzPq88RYNDhkMIiCkM0NDK+0HOI=",
 			"path": "github.com/pelletier/go-toml",
-			"revision": "439fbba1f887c286024370cb4f281ba815c4c7d7",
-			"revisionTime": "2016-12-29T18:51:04Z"
+			"revision": "fee7787d3f811af92276f5ff10107092e95b7a1d",
+			"revisionTime": "2017-03-14T20:16:40Z"
 		},
 		{
 			"checksumSHA1": "ynJSWoF6v+3zMnh9R0QmmG6iGV8=",