mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
hugolib: Handle any errors in processShortcodes
This commit is contained in:
@@ -1371,11 +1371,16 @@ func (p *Page) SaveSource() error {
|
||||
return p.SaveSourceAs(p.FullFilePath())
|
||||
}
|
||||
|
||||
func (p *Page) ProcessShortcodes() {
|
||||
func (p *Page) processShortcodes() error {
|
||||
p.shortcodeState = newShortcodeHandler()
|
||||
tmpContent, _ := p.shortcodeState.extractAndRenderShortcodes(string(p.workContent), p)
|
||||
tmpContent, err := p.shortcodeState.extractAndRenderShortcodes(string(p.workContent), p)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
p.workContent = []byte(tmpContent)
|
||||
|
||||
return nil
|
||||
|
||||
}
|
||||
|
||||
func (p *Page) FullFilePath() string {
|
||||
|
Reference in New Issue
Block a user