Catch incomplete shortcode error
authorsatotake <doublequotation@gmail.com>
Mon, 24 May 2021 12:59:02 +0000 (21:59 +0900)
committerGitHub <noreply@github.com>
Mon, 24 May 2021 12:59:02 +0000 (14:59 +0200)
commit845a7ba4fc30c61842148d67d31d0fa3db8f40b9
treeebe8b5c909b39ac9258e27fbc16bb1b3e3ce2d79
parent10f60de89a5a53528f1e3a47a77224e5c7915e4e
Catch incomplete shortcode error

Currently, no name shortcodes (`{{< >}}`) enter unexpected branch and
throw `BUG: template info not set`. This patch checks if shortcode has
name or not earlier and throws specific error.

Closes #6866
hugolib/shortcode.go
hugolib/shortcode_test.go