From 3820aa56049e3b1b108c56143306e029e7acd596 Mon Sep 17 00:00:00 2001 From: Ella-0 <23418164+Ella-0@users.noreply.github.com> Date: Sun, 30 May 2021 19:59:27 +0100 Subject: [PATCH] mdtohtml: add head flag --- pkgs/mdtohtml/exts.patch | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/pkgs/mdtohtml/exts.patch b/pkgs/mdtohtml/exts.patch index 83c6159..c9e6b83 100644 --- a/pkgs/mdtohtml/exts.patch +++ b/pkgs/mdtohtml/exts.patch @@ -1,6 +1,23 @@ --- a/main.go +++ b/main.go -@@ -100,7 +100,8 @@ +@@ -17,7 +17,7 @@ + + func main() { + var page, toc, xhtml, latex, smartypants, latexdashes, fractions bool +- var css, cpuprofile string ++ var css, cpuprofile, head string + var repeat int + flag.BoolVar(&page, "page", false, + "Generate a standalone HTML page (implies -latex=false)") +@@ -39,6 +39,7 @@ + "Write cpu profile to a file") + flag.IntVar(&repeat, "repeat", 1, + "Process the input multiple times (for benchmarking)") ++ flag.StringVar(&head, "head", "", "Add extra stuff to header") + flag.Usage = func() { + fmt.Fprintf(os.Stderr, "Markdown Processor "+ + "\nAvailable at http://github.com/gomarkdown/markdown/cmd/mdtohtml\n\n"+ +@@ -100,7 +101,8 @@ parser.FencedCode | parser.Autolink | parser.Strikethrough | @@ -10,3 +27,11 @@ var renderer markdown.Renderer if latex { +@@ -133,6 +135,7 @@ + Flags: htmlFlags, + Title: title, + CSS: css, ++ Head: []byte(head), + } + renderer = html.NewRenderer(params) + }