mirror of
https://github.com/gohugoio/hugo.git
synced 2024-12-29 03:43:10 +00:00
parent
028b992611
commit
7f3aab5ac2
1 changed files with 10 additions and 2 deletions
|
@ -18,6 +18,7 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
"html/template"
|
"html/template"
|
||||||
|
"runtime/debug"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
"unicode/utf8"
|
"unicode/utf8"
|
||||||
|
@ -65,8 +66,15 @@ func newPageContentOutput(p *pageState) func(f output.Format) (*pageContentOutpu
|
||||||
f: f,
|
f: f,
|
||||||
}
|
}
|
||||||
|
|
||||||
initContent := func() error {
|
initContent := func() (err error) {
|
||||||
var 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
|
var hasVariants bool
|
||||||
|
|
||||||
cp.contentPlaceholders, hasVariants, err = p.shortcodeState.renderShortcodesForPage(p, f)
|
cp.contentPlaceholders, hasVariants, err = p.shortcodeState.renderShortcodesForPage(p, f)
|
||||||
|
|
Loading…
Reference in a new issue