mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-28 06:30:33 +03:00
parent
20f2211fce
commit
19e12caf8c
4 changed files with 62 additions and 13 deletions
|
@ -631,6 +631,20 @@ func (p *pageState) wrapError(err error) error {
|
|||
}
|
||||
|
||||
func (p *pageState) getContentConverter() converter.Converter {
|
||||
var err error
|
||||
p.m.contentConverterInit.Do(func() {
|
||||
markup := p.m.markup
|
||||
if markup == "html" {
|
||||
// Only used for shortcode inner content.
|
||||
markup = "markdown"
|
||||
}
|
||||
p.m.contentConverter, err = p.m.newContentConverter(p, markup, p.m.renderingConfigOverrides)
|
||||
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
p.s.Log.ERROR.Println("Failed to create content converter:", err)
|
||||
}
|
||||
return p.m.contentConverter
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue