iglunix/pkgs/mdtohtml/exts.patch

38 lines
1 KiB
Diff
Raw Normal View History

2021-04-06 07:15:33 +00:00
--- a/main.go
+++ b/main.go
2021-05-30 18:59:27 +00:00
@@ -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 @@
2021-04-06 07:15:33 +00:00
parser.FencedCode |
parser.Autolink |
parser.Strikethrough |
- parser.SpaceHeadings
+ parser.SpaceHeadings |
+ parser.Footnotes
var renderer markdown.Renderer
if latex {
2021-05-30 18:59:27 +00:00
@@ -133,6 +135,7 @@
Flags: htmlFlags,
Title: title,
CSS: css,
+ Head: []byte(head),
}
renderer = html.NewRenderer(params)
}