mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-28 06:30:33 +03:00
Reuse the BlackFriday instance when possible
This is in heavy use in rendering, so this makes a difference: ```bash benchmark old ns/op new ns/op delta BenchmarkSiteBuilding/TOML,num_langs=1,num_pages=500,tags_per_page=5,shortcodes,render-4 124551144 107743429 -13.49% benchmark old allocs new allocs delta BenchmarkSiteBuilding/TOML,num_langs=1,num_pages=500,tags_per_page=5,shortcodes,render-4 528684 435118 -17.70% benchmark old bytes new bytes delta BenchmarkSiteBuilding/TOML,num_langs=1,num_pages=500,tags_per_page=5,shortcodes,render-4 53306848 45147832 -15.31% ```
This commit is contained in:
parent
2511498608
commit
db4b7a5c67
6 changed files with 36 additions and 33 deletions
|
@ -98,7 +98,7 @@ func (ns *Namespace) Markdownify(s interface{}) (template.HTML, error) {
|
|||
Cfg: ns.deps.Cfg,
|
||||
Content: []byte(ss),
|
||||
PageFmt: "markdown",
|
||||
Config: ns.deps.ContentSpec.NewBlackfriday(),
|
||||
Config: ns.deps.ContentSpec.BlackFriday,
|
||||
},
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue