Open bep opened 1 year ago
markdown
{{< a >}}{{< b >}}
layouts/shortcodes/a.html
a\n
layouts/shortcodes/b.html
b\n
rendered in browser (what you see):
a b
So, after the proposed change, you will see:
ab
Is that correct? If yes, can we flip the default?
ab
According to my proposal (trim 1 empty newline), both of your shortcodes would be left untouched and rendered to
a b
... but then again, looking at the original discussion, that would not solve the original problem. Oh, well, I need to think.
Just a comment after the @jmooring proposal: as a user of Hugo I want to obtain:
ab
In my opinion, if I want a space between these two letters I introduce it:
{{< a >}} {{< b >}}
a\n
Two notes:
a b
as a resultJust a comment after the @jmooring proposal
That was a question, not a proposal. This issue is really about removing the trailing new line from templates, which has been requested in the past, but at this point is a bit of a breaking change.
See https://discourse.gohugo.io/t/extra-newline-after-every-link-due-to-render-link-html/45562/6
I suspect this isn't a problem with just render hooks, and doing it for "all templates" is certainly easier to implement.
Would become
Would become
Would be preserved as is.