From cf87ac38af788512f213c99756fd6cabf96043c1 Mon Sep 17 00:00:00 2001 From: Kevin Burke Date: Sun, 30 Jun 2019 21:33:15 -0700 Subject: [PATCH] main: execute cmark with --unsafe --- main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 8bb692d..2bf06e5 100644 --- a/main.go +++ b/main.go @@ -143,11 +143,14 @@ func main() { // shell out to markdown because of // https://github.com/russross/blackfriday/issues/403 cmark, lookErr := exec.LookPath("cmark") + args := []string{cmark, "--unsafe", f.Name()} if lookErr != nil { + args = args[:0] cmark, lookErr = exec.LookPath("markdown") checkError(lookErr, "finding markdown binary") + args = []string{cmark, f.Name()} } - execErr := localExec(cmark, []string{cmark, f.Name()}, []string{}) + execErr := localExec(cmark, args, []string{}) checkError(execErr, "executing markdown binary") if err := f.Close(); err != nil { checkError(err, "closing file")