Hello everyone,
I created a shortcode which uses the .Inner content, but there is one problem. Sometimes, specific parts are just not being displayed, because they’re apparently recognized as some syntax similar to HTML used in Markdown, which is being ignored.
Let me make an example.
This:
{{< codeblock `c#` >}}var x = obj.GetComponent<Type>();
{{< /codeblock >}}
outputs only this in the end:
var x = obj.GetComponent();
So <Type>
is simply being ignored.
This is the relevant part of the shortcode:
{{ $lang := .Get 0 }}
{{ $content := .Inner }}
<pre><code class="{{ $lang }}">{{.Inner}}</code></pre>
How could I get rid of this behavior and simply output the content as is? Important to mention: There are specific situations where I want HTML to influence the content (for example to mark text as bold with the tag), but in this case, I want to output the content as is.
Thank you very much!