mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
Fix shortcode name in error message on self-closing shortcodes with no .Inner
Fixes #13344
This commit is contained in:
@@ -650,7 +650,11 @@ Loop:
|
||||
// return that error, more specific
|
||||
continue
|
||||
}
|
||||
return nil, fmt.Errorf("%s: shortcode %q does not evaluate .Inner or .InnerDeindent, yet a closing tag was provided", errorPrefix, next.ValStr(source))
|
||||
name := sc.name
|
||||
if name == "" {
|
||||
name = next.ValStr(source)
|
||||
}
|
||||
return nil, fmt.Errorf("%s: shortcode %q does not evaluate .Inner or .InnerDeindent, yet a closing tag was provided", errorPrefix, name)
|
||||
}
|
||||
}
|
||||
if next.IsRightShortcodeDelim() {
|
||||
|
Reference in New Issue
Block a user