ref: fd3d90ced85baaf6941be45b2fe29c25ff755c18
parent: 3ae4b3e19ff6be90d21b0cc38fa6ed37a83bd505
author: Vazrupe (HyeonGyu Lee) <vazrupe@naver.com>
date: Mon Aug 19 19:26:53 EDT 2019
hugolib: Change to output non-panic error message if missing shortcode template A panic occurred when the `nested` variable was nil. Changed to check if the `nested` variable is nil. Fixes #6075
--- a/hugolib/shortcode.go
+++ b/hugolib/shortcode.go
@@ -473,9 +473,10 @@
pt.Backup()
nested, err := s.extractShortcode(nestedOrdinal, nextLevel, pt)
nestedOrdinal++
- if nested.name != "" {
+ if nested != nil && nested.name != "" {
s.nameSet[nested.name] = true
}
+
if err == nil {
sc.inner = append(sc.inner, nested)
} else {