diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-04-22 18:12:49 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-04-22 19:10:15 +0200 |
commit | 509ab08c1b140de421c376235faa566f87ea666e (patch) | |
tree | 5e72a0d3b5c13adecced6e7471c50fe68f031537 /hugolib | |
parent | 2d75f539e14858a7b28484b2ad1f72db284892cb (diff) | |
download | hugo-509ab08c1b140de421c376235faa566f87ea666e.tar.gz hugo-509ab08c1b140de421c376235faa566f87ea666e.zip |
markup/goldmark: Fix data race in the hugocontext wrapper
The window for this to happen is very small, but it has been reported by Go's race detector (-race flag) in a tests once.
Diffstat (limited to 'hugolib')
-rw-r--r-- | hugolib/page__per_output.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hugolib/page__per_output.go b/hugolib/page__per_output.go index 4ff67c074..2adb5cbb7 100644 --- a/hugolib/page__per_output.go +++ b/hugolib/page__per_output.go @@ -175,7 +175,7 @@ func (pco *pageContentOutput) RenderShortcodes(ctx context.Context) (template.HT // This content will be parsed and rendered by Goldmark. // Wrap it in a special Hugo markup to assign the correct Page from // the stack. - c = hugocontext.Wrap(c, pco.po.p.pid) + return template.HTML(hugocontext.Wrap(c, pco.po.p.pid)), nil } return helpers.BytesToHTML(c), nil |