mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-26 05:49:58 +00:00
5332177bdd
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.27.4 to 2.27.5. - [Release notes](https://github.com/urfave/cli/releases) - [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md) - [Commits](https://github.com/urfave/cli/compare/v2.27.4...v2.27.5) --- updated-dependencies: - dependency-name: github.com/urfave/cli/v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
24 lines
511 B
Go
24 lines
511 B
Go
package md2man
|
|
|
|
import (
|
|
"os"
|
|
"strconv"
|
|
|
|
"github.com/russross/blackfriday/v2"
|
|
)
|
|
|
|
// Render converts a markdown document into a roff formatted document.
|
|
func Render(doc []byte) []byte {
|
|
renderer := NewRoffRenderer()
|
|
var r blackfriday.Renderer = renderer
|
|
if v, _ := strconv.ParseBool(os.Getenv("MD2MAN_DEBUG")); v {
|
|
r = &debugDecorator{Renderer: r}
|
|
}
|
|
|
|
return blackfriday.Run(doc,
|
|
[]blackfriday.Option{
|
|
blackfriday.WithRenderer(r),
|
|
blackfriday.WithExtensions(renderer.GetExtensions()),
|
|
}...)
|
|
}
|