summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorEgon Elbre <[email protected]>2013-12-16 10:34:26 +0200
committerspf13 <[email protected]>2013-12-28 13:47:21 -0500
commit1c60d5bf2027815fda31d7fa9c1c98033a3c614e (patch)
tree6d0e115ea0d79260af1aa2bf4de9e6f8354d5f75
parent8d80f9b39e42dd5b61af052979a7c04dc8edf851 (diff)
downloadhugo-1c60d5bf2027815fda31d7fa9c1c98033a3c614e.tar.gz
hugo-1c60d5bf2027815fda31d7fa9c1c98033a3c614e.zip
Don't shutdown hugo on an empty file.
-rw-r--r--parser/page.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/parser/page.go b/parser/page.go
index 248b172cd..54b5acfb9 100644
--- a/parser/page.go
+++ b/parser/page.go
@@ -64,12 +64,12 @@ func (p *page) IsRenderable() bool {
func ReadFrom(r io.Reader) (p Page, err error) {
reader := bufio.NewReader(r)
- if err = chompWhitespace(reader); err != nil {
+ if err = chompWhitespace(reader); err != nil && err != io.EOF {
return
}
firstLine, err := peekLine(reader)
- if err != nil {
+ if err != nil && err != io.EOF {
return
}