documentation states that .Inner
Returns highlighted code without any wrapping elements, allowing you to create your own wrapper.
but that is not the case for codeblocks without any .Type.
reproducer:
; hugo new project meow
# a bunch of output
; cd meow
; echo '{{ .Content }}' > layouts/home.html
; mkdir layouts/_markup
; cat >layouts/_markup/render-codeblock.html <<'EOF'
{{ $result := transform.HighlightCodeBlock . }}
<pre><code>{{ $result.Inner }}</code></pre>
EOF
; cat >content/_index.md <<'EOF'
```
meow
```
EOF
; hugo build
; cat public/index.html
<pre><code><pre tabindex="0"><code>meow</code></pre></code></pre>
What version of Hugo are you using (hugo version)?
$ hugo version
hugo v0.160.1+extended+withdeploy linux/amd64 BuildDate=unknown VendorInfo=nixpkgs
Does this issue reproduce with the latest release?
yes
documentation states that
.Innerbut that is not the case for codeblocks without any
.Type.reproducer:
What version of Hugo are you using (
hugo version)?Does this issue reproduce with the latest release?
yes