aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-07-20 15:46:14 +0200
committerMichael Muré <batolettre@gmail.com>2018-07-20 15:46:14 +0200
commite89f87624f27b7b98efc959bd96e260ac86f9236 (patch)
tree6561a1c1eb1660736c48d668f43ccaf67cce19a2 /vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go
parent1dd5118eebe0e993d55ae5433cb2dcfd2764bf4f (diff)
downloadgit-bug-e89f87624f27b7b98efc959bd96e260ac86f9236.tar.gz
generate markdown documentation
Diffstat (limited to 'vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go')
-rw-r--r--vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go b/vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go
new file mode 100644
index 00000000..af62279a
--- /dev/null
+++ b/vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go
@@ -0,0 +1,20 @@
+package md2man
+
+import (
+ "github.com/russross/blackfriday"
+)
+
+// Render converts a markdown document into a roff formatted document.
+func Render(doc []byte) []byte {
+ renderer := RoffRenderer(0)
+ extensions := 0
+ extensions |= blackfriday.EXTENSION_NO_INTRA_EMPHASIS
+ extensions |= blackfriday.EXTENSION_TABLES
+ extensions |= blackfriday.EXTENSION_FENCED_CODE
+ extensions |= blackfriday.EXTENSION_AUTOLINK
+ extensions |= blackfriday.EXTENSION_SPACE_HEADERS
+ extensions |= blackfriday.EXTENSION_FOOTNOTES
+ extensions |= blackfriday.EXTENSION_TITLEBLOCK
+
+ return blackfriday.Markdown(doc, renderer, extensions)
+}