mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-25 13:35:00 +00:00
7bf5c25831
Signed-off-by: Evan Lezar <elezar@nvidia.com>
15 lines
353 B
Go
15 lines
353 B
Go
package md2man
|
|
|
|
import (
|
|
"github.com/russross/blackfriday/v2"
|
|
)
|
|
|
|
// Render converts a markdown document into a roff formatted document.
|
|
func Render(doc []byte) []byte {
|
|
renderer := NewRoffRenderer()
|
|
|
|
return blackfriday.Run(doc,
|
|
[]blackfriday.Option{blackfriday.WithRenderer(renderer),
|
|
blackfriday.WithExtensions(renderer.GetExtensions())}...)
|
|
}
|