From: James Mills Date: Sat, 23 Oct 2021 03:57:19 +0000 (+1000) Subject: Add Markdown extensions to blackfriday X-Git-Tag: 0.0.2~4 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=40012efba4767d9d3157cfd32a317caaea07fdca;p=aya.git Add Markdown extensions to blackfriday --- diff --git a/main.go b/main.go index fcea445..49657aa 100644 --- a/main.go +++ b/main.go @@ -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 {