mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02:00
helpers: Fix TrimShortHTML when used with AsciiDoc content
Fixes #12369
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
8e50ccfae7
commit
6049ba99f0
@@ -363,9 +363,11 @@ func (pco *pageContentOutput) RenderString(ctx context.Context, args ...any) (te
|
||||
}
|
||||
|
||||
if opts.Display == "inline" {
|
||||
// We may have to rethink this in the future when we get other
|
||||
// renderers.
|
||||
rendered = pco.po.p.s.ContentSpec.TrimShortHTML(rendered)
|
||||
markup := pco.po.p.m.pageConfig.Markup
|
||||
if opts.Markup != "" {
|
||||
markup = pco.po.p.s.ContentSpec.ResolveMarkup(opts.Markup)
|
||||
}
|
||||
rendered = pco.po.p.s.ContentSpec.TrimShortHTML(rendered, markup)
|
||||
}
|
||||
|
||||
return template.HTML(string(rendered)), nil
|
||||
|
Reference in New Issue
Block a user