mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-29 23:53:32 -05:00
hugolib: apply some Hugolint rules
This commit is contained in:
parent
b9f8c0c120
commit
8539f78143
2 changed files with 4 additions and 6 deletions
|
@ -56,6 +56,6 @@ func (h HandledResult) String() string {
|
||||||
return h.Error()
|
return h.Error()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (hr HandledResult) Page() *Page {
|
func (h HandledResult) Page() *Page {
|
||||||
return hr.page
|
return h.page
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,9 +65,8 @@ func (h markdownHandler) PageConvert(p *Page, t tpl.Template) HandledResult {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
jww.FATAL.Printf("Fail to replace short code tokens in %s:\n%s", p.BaseFileName(), err.Error())
|
jww.FATAL.Printf("Fail to replace short code tokens in %s:\n%s", p.BaseFileName(), err.Error())
|
||||||
return HandledResult{err: err}
|
return HandledResult{err: err}
|
||||||
} else {
|
|
||||||
tmpContent = tmpContentWithTokensReplaced
|
|
||||||
}
|
}
|
||||||
|
tmpContent = tmpContentWithTokensReplaced
|
||||||
}
|
}
|
||||||
|
|
||||||
p.Content = helpers.BytesToHTML(tmpContent)
|
p.Content = helpers.BytesToHTML(tmpContent)
|
||||||
|
@ -118,9 +117,8 @@ func (h rstHandler) PageConvert(p *Page, t tpl.Template) HandledResult {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
jww.FATAL.Printf("Fail to replace short code tokens in %s:\n%s", p.BaseFileName(), err.Error())
|
jww.FATAL.Printf("Fail to replace short code tokens in %s:\n%s", p.BaseFileName(), err.Error())
|
||||||
return HandledResult{err: err}
|
return HandledResult{err: err}
|
||||||
} else {
|
|
||||||
tmpContent = tmpContentWithTokensReplaced
|
|
||||||
}
|
}
|
||||||
|
tmpContent = tmpContentWithTokensReplaced
|
||||||
}
|
}
|
||||||
|
|
||||||
p.Content = helpers.BytesToHTML(tmpContent)
|
p.Content = helpers.BytesToHTML(tmpContent)
|
||||||
|
|
Loading…
Reference in a new issue