HTML in nested shortcode gets escaped

@maiki You mean like:

note-open.html:

<div class="note">
  <div class="info-header"> Note</div>
  <div class="info-body">

note-close.html

  </div>
</div>

And then using it like:

{{< note-open >}}
…regular markdown here…
{{< note-close >}}

?

That works, and thanks for the idea, but that seems like a really unfortunate hack. Even dynamically rewriting the DOM via Javascript seems more appealing.

Adding raw HTML each time is out of the question – I’m writing documentation (almost 200 pages by now) and the files need to stay clean. If it was just a small website or blog, where posts are “finished” products unlikely to be revised a lot, then I might feel different about it.

Somehow I didn’t expect this to be a genuine limitation. I mean, certainly nesting can be expected to be common for all but the simplest of pages. I wanted to treat shortcodes like “macros” in programming languages, but if Hugo demands that everything stay in Markdown (I already had to enable unsafe = true in Goldmark) then that takes away a lot of the appeal, since Markdown and HTML have limited overlap.