Demonstrates an issue with Hugo shortcodes loosing their "html context" when getting nested.
- Hugo GitHub issue: gohugoio/hugo#11298
- Hugo Forum: https://discourse.gohugo.io/t/nested-shortcodes-render-markdown-in-html-content-file/45536
- Clone this repo
- Run
hugo server
- View the source of
http://localhost:1313/posts/test/
Files of interest:
Generated HTML should be:
<!-- Start -->
<div class="page">
<div class="inner">Test</div>
<hr>
<div class="inner">Test</div>
<hr>
No **markdown** expected here
<hr>
<div class="inner">Test</div>
<div class="outer">
<div class="inner">Test</div>
<hr>
<div class="inner">Test</div>
<hr>
No **markdown** expected here
<hr>
<div class="inner">No **markdown** expected here</p>
</div>
</div>
</div>
<!-- END -->
Generated HTML is:
<!-- Start -->
<div class="page">
<div class="inner">Test</div>
<hr>
<div class="inner">Test</div>
<hr>
No **markdown** expected here
<hr>
<div class="inner">Test</div>
<div class="outer">
<div class="inner"><p>Test</p>
</div>
<hr>
<div class="inner">Test</div>
<hr>
No **markdown** expected here
<hr>
<div class="inner"><p>No <strong>markdown</strong> expected here</p>
</div>
</div>
</div>
<!-- END -->