Add Markdown extensions to blackfriday

This commit is contained in:
James Mills 2021-10-23 13:57:19 +10:00
parent 054f525327
commit 40012efba4
No known key found for this signature in database
GPG Key ID: AC4C014F1440EBD6
1 changed files with 4 additions and 1 deletions

View File

@ -182,7 +182,10 @@ func buildMarkdown(path string, w io.Writer, vars Vars) error {
if err != nil {
return err
}
v["content"] = string(blackfriday.Run([]byte(content)))
v["content"] = string(blackfriday.Run(
[]byte(content),
blackfriday.WithExtensions(blackfriday.CommonExtensions|blackfriday.AutoHeadingIDs),
))
if w == nil {
out, err := os.Create(filepath.Join(PUBDIR, renameExt(path, "", ".html")))
if err != nil {