-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
.RenderShortcodes generates artifact when used nested in HTML #12854
Comments
No, but I'm assuming you're doing something ... unusual that we didn't think of when we implemented this. Because it doesn't always happen. |
Hm. I stripped the sample down to the bones. In my view, nothing special here. |
This usage is unusual:
I suggest you read the documentation and/or start a thread in the forum about the intention/use cases of |
For others who may come around: The artifacts seem to be avoided if the shortcode is changed by adding a blank line in front of
|
For others who may come around: Please read and understand the documentation at https://gohugo.io/methods/page/rendershortcodes/ and consider if you really need to use this method. It is very useful, but it a special purpose If you wrap your |
Thanks bep for the fix. Just for clarification, does this fix change your statement from above?
|
No. The fix is to catch an error situation. I will print a warning (that can be turned off) about it. The only use case I can think of for |
This issue fixes two cases where `{{__hugo_ctx` artifacts were left in the rendered output: 1. Inclusion when `.RenderShortcodes` is wrapped in HTML. 2. Inclusion of Markdown file without a trailing newline in some cases. Closes gohugoio#12854
That said, the PR fixes 2 issues with similar symptoms (see test cases); one of them is perfectly valid use ... |
This is required per the CommonMark specification for HTML blocks. Specifically, read about the end condition for the sixth "type" of HTML block. |
This issue fixes two cases where `{{__hugo_ctx` artifacts were left in the rendered output: 1. Inclusion when `.RenderShortcodes` is wrapped in HTML. 2. Inclusion of Markdown file without a trailing newline in some cases. Closes gohugoio#12854
This issue fixes two cases where `{{__hugo_ctx` artifacts were left in the rendered output: 1. Inclusion when `.RenderShortcodes` is wrapped in HTML. 2. Inclusion of Markdown file without a trailing newline in some cases. Closes gohugoio#12854 Updates gohugoio#12998
This issue fixes two cases where `{{__hugo_ctx` artifacts were left in the rendered output: 1. Inclusion when `.RenderShortcodes` is wrapped in HTML. 2. Inclusion of Markdown file without a trailing newline in some cases. Closes gohugoio#12854 Updates gohugoio#12998
This issue fixes two cases where `{{__hugo_ctx` artifacts were left in the rendered output: 1. Inclusion when `.RenderShortcodes` is wrapped in HTML. 2. Inclusion of Markdown file without a trailing newline in some cases. Closes gohugoio#12854 Updates gohugoio#12998
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Configured
renderer.unsafe=true
and then using.RenderShortcodes
in a shortcode used with%
generates artifacts in the form of{{__hugo_ctx pid=3}}
.Is this intended?
This can be seen in the sample repo in http:/localhost:1313/posts
https://github.com/McShelby/hugo-testing/tree/hugo-issue-12854
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes. The used version was the latest.
The text was updated successfully, but these errors were encountered: