Skip to content
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

nil fix for 10391 #10392

Merged
merged 2 commits into from Oct 26, 2022
Merged

nil fix for 10391 #10392

merged 2 commits into from Oct 26, 2022

Conversation

davidejones
Copy link
Contributor

This PR is an attempt to fix #10391, while the changes pass the test my biggest concern is if this is the correct approach? I'm not really sure why a cp would be nil at this point.

@bep
Copy link
Member

bep commented Oct 26, 2022

The tests go green, but the patch looks odd (and probably data racy). I'll have a look.

We do lazy initialization and (potentially) reuse of an output format's rendered content. We do this evaluation when we
start a new rendering a new output format. There are, however, situation where these borders gets crossed (e.g.
accessing content from another output format). We have a check for this in place for most cases, but not the content
rendering of inner markdown blocks inside shortcodes. This patch applies that same logic to the newly introduced
RenderContent method (which is not available from the templates).

Fixes gohugoio#10391
@bep bep merged commit 631d768 into gohugoio:master Oct 26, 2022
@davidejones davidejones deleted the davidejones/nil-bug branch October 26, 2022 11:10
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nil pointer outputformat shortcode bug
2 participants