I am trying to create a shortcode that places text (markdown) next to a partial.
I can either get the markdown to render properly or the partial, but not both. If I use {{%…%}}, the markdown is correct, and the partial is broken. If I use {{<…>}} the markdown does not render, but the partial works fine.
The documentation on RenderString says (about the display option): If inline (default), surrounding <p></p> on short snippets will be trimmed.
Are the \<p> tags not removed on long snippets? And how short is “short”? Sometimes reading the documentation leaves me with more questions than I had before.
The “surrounding p-tags” relates to Markdown creating paragraphs for even a single line if it’s going to be rendered. So if your string is for instance a button text, then tell Hugo to do it inline and it won’t have p-tags around it. If it’s a paragraph, then tell Hugo to do it as block and the p-tags will be kept.
If it’s lots of Markdown it will render to what the markdown is about, without “extra” p-tags around. This is only about short strings.