Can you know, inside a codeblock render-hook, if the .Inner has only one block of text, or several things ?
Because it’s impossible to select an element that is empty except a block of text, I’d like to make sure all texts is encapsulated in a paragraph.
markdown
```bq
**foo**
```
```bq
**foo**
bar
```
layouts/_default/_markup/render-codeblock-bq.html
<blockquote>
{{ .Inner | .Page.RenderString (dict "display" "block") }}
</blockquote>
rendered
<blockquote>
<p><strong>foo</strong></p>
</blockquote>
<blockquote>
<p><strong>foo</strong></p>
<p>bar</p>
</blockquote>
1 Like
Well, I didn’t know that method had options. Thanks !
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.