From 40012efba4767d9d3157cfd32a317caaea07fdca Mon Sep 17 00:00:00 2001 From: James Mills Date: Sat, 23 Oct 2021 13:57:19 +1000 Subject: [PATCH] Add Markdown extensions to blackfriday --- main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 { -- 2.43.0