shithub: hugo

Download patch

ref: 8b95cab94ce3426681f32c6f07620a3c7d2f572a
parent: dd9344816a57586234e26554e06af331f16c0919
author: bep <[email protected]>
date: Sun Feb 1 17:29:46 EST 2015

Avoid panic on unknown markup

Fixes #863

--- a/hugolib/handler_meta.go
+++ b/hugolib/handler_meta.go
@@ -16,6 +16,7 @@
 import (
 	"errors"
 
+	"fmt"
 	"github.com/spf13/hugo/source"
 )
 
@@ -66,6 +67,12 @@
 			results <- HandledResult{err: errors.New("file resulted in a nil page")}
 			return
 		}
+
+		if h == nil {
+			results <- HandledResult{err: fmt.Errorf("No handler found for page '%s'. Verify the markup is supported by Hugo.", p.FullFilePath())}
+			return
+		}
+
 		results <- h.PageConvert(p, s.Tmpl)
 		p.setSummary()
 		p.analyzePage()