aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/cpuguy83/go-md2man/md2man/md2man.go
diff options
context:
space:
mode:
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)
+}