changeset 17:c515a9fa8bd5

Fix a typos in README.md (Merge branch felix)
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 25 Jun 2020 21:18:30 +0200
parents ebecd141e9d3 (diff) c21a0e7b695f (current diff)
children adc92b0118f4
files
diffstat 2 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/test.md	Thu Jun 25 21:17:58 2020 +0200
+++ b/test.md	Thu Jun 25 21:18:30 2020 +0200
@@ -53,6 +53,8 @@
 
 ## TODO
 Some things need doing
+ - [x] Fix bug where there's a nil error when there is no yaml in .md file
+ - [ ] Fix bug where wdown doesn't work without a template
  - [x] Build the simplest possible markdown commandline utility
  - [x] Add command-line argument parsing
  - [x] Allow template file as an input
--- a/wdown.go	Thu Jun 25 21:17:58 2020 +0200
+++ b/wdown.go	Thu Jun 25 21:18:30 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)