mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
@@ -18,6 +18,7 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"runtime/debug"
|
||||
"strings"
|
||||
"sync"
|
||||
"unicode/utf8"
|
||||
@@ -65,8 +66,15 @@ func newPageContentOutput(p *pageState) func(f output.Format) (*pageContentOutpu
|
||||
f: f,
|
||||
}
|
||||
|
||||
initContent := func() error {
|
||||
var err error
|
||||
initContent := func() (err error) {
|
||||
defer func() {
|
||||
// See https://github.com/gohugoio/hugo/issues/6210
|
||||
if r := recover(); r != nil {
|
||||
err = fmt.Errorf("%s", r)
|
||||
p.s.Log.ERROR.Println("[BUG] Got panic:\n", string(debug.Stack()))
|
||||
}
|
||||
}()
|
||||
|
||||
var hasVariants bool
|
||||
|
||||
cp.contentPlaceholders, hasVariants, err = p.shortcodeState.renderShortcodesForPage(p, f)
|
||||
|
Reference in New Issue
Block a user