mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
hugolib: apply some Hugolint rules
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user