Mercurial > repos > public > wdown
diff wdown.go @ 15:ebecd141e9d3
Fix crash when there is no YAML
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 25 Jun 2020 21:16:19 +0200 |
parents | 1ffe6e4f933c |
children | adc92b0118f4 |
line wrap: on
line diff
--- a/wdown.go Mon Jun 22 07:55:14 2020 +0200 +++ b/wdown.go Thu Jun 25 21:16:19 2020 +0200 @@ -66,6 +66,9 @@ if useTemplate { templateVars := meta.Get(parserContext) + if templateVars == nil { + templateVars = map[string]interface{}{} + } templateVars["content"] = htmlContent.String() err := tmpl.FRender(os.Stdout, templateVars)