Here is a sample repo: GitHub - fnordfish/hugo-shortcode-nesting-test
As expected, Markdown will not be interpreted in a html
content files. Even when using {{% %}}
shortcodes.
But when shortcodes get nested, the inner shortcode suddenly interprets markdown:
No **markdown** here
{{% shortcode %}}No **markdown** here{{% /shortcode %}}
{{% wrap %}}
{{% shortcode %}}But **markdown** here ☹️{{% /shortcode %}}
{{% /wrap %}}
Is that a know/expected/deliberate limitation of nested shortcodes, or a bug/feature regression?
I realize that the quick-fix would be to use {{< >}}
, but I’d like to understand the reason for this behavior. I also appreciate the %
notation in HTML context because it does not look like HTML, making life easier for code highlighters.
Thanks!