Hi,
I have this shortcode called “hidden.html”
<div>
<p class="d-inline-flex gap-1">
<a class="btn btn-primary" data-bs-toggle="collapse" href="#{{ .Get 1 }}" role="button" aria-expanded="false" aria-controls="collapseExample">
{{ .Get 0 }}
</a>
</p>
<div class="collapse" id="{{ .Get 1 }}">
<div class="card card-body">
{{ .Inner | markdownify }}
</div>
</div>
</div>
I have a second one (simplified here) called “image.html”:
{{- if .Parent -}}
<img src="{{ .Get 0 | relURL }}">
{{- else -}}
<div class="text-center">
<img src="{{ .Get 0 | relURL }}">
</div>
{{- end -}}
I would like to be able to use the image shortcode inside the hidden shortcode such as:
{{< hidden "Answers" "ans1" >}}
1. Answer to question 1.
2. Answer to question 2 illustrated by a picture:
{{< image "link.jpg" >}}
{{< /hidden >}}
The problem is that the image is not shown. The generated HTML code says “raw HTML omitted”. The image is shown if I remove the markdownify used in the hidden shortcode but I lose the layout of the items.
Do you have an idea on how I can “unmarkdownify” inside my image shortcode?