diff --git a/hugolib/handler_base.go b/hugolib/handler_base.go index 7f02973c5..f74409166 100644 --- a/hugolib/handler_base.go +++ b/hugolib/handler_base.go @@ -56,6 +56,6 @@ func (h HandledResult) String() string { return h.Error() } -func (hr HandledResult) Page() *Page { - return hr.page +func (h HandledResult) Page() *Page { + return h.page } diff --git a/hugolib/handler_page.go b/hugolib/handler_page.go index b3b236344..5e92ff7e9 100644 --- a/hugolib/handler_page.go +++ b/hugolib/handler_page.go @@ -65,9 +65,8 @@ func (h markdownHandler) PageConvert(p *Page, t tpl.Template) HandledResult { if err != nil { jww.FATAL.Printf("Fail to replace short code tokens in %s:\n%s", p.BaseFileName(), err.Error()) return HandledResult{err: err} - } else { - tmpContent = tmpContentWithTokensReplaced } + tmpContent = tmpContentWithTokensReplaced } p.Content = helpers.BytesToHTML(tmpContent) @@ -118,9 +117,8 @@ func (h rstHandler) PageConvert(p *Page, t tpl.Template) HandledResult { if err != nil { jww.FATAL.Printf("Fail to replace short code tokens in %s:\n%s", p.BaseFileName(), err.Error()) return HandledResult{err: err} - } else { - tmpContent = tmpContentWithTokensReplaced } + tmpContent = tmpContentWithTokensReplaced } p.Content = helpers.BytesToHTML(tmpContent)