Merge pull request #25978 from containers/renovate/github.com-cpuguy83-go-md2man-v2-2.x

fix(deps): update module github.com/cpuguy83/go-md2man/v2 to v2.0.7
This commit is contained in:
openshift-merge-bot[bot]
2025-04-25 10:44:50 +00:00
committed by GitHub
8 changed files with 39 additions and 16 deletions

View File

@ -6,7 +6,7 @@ module github.com/containers/podman/test/tools
go 1.22.0 go 1.22.0
require ( require (
github.com/cpuguy83/go-md2man/v2 v2.0.6 github.com/cpuguy83/go-md2man/v2 v2.0.7
github.com/go-swagger/go-swagger v0.30.5 github.com/go-swagger/go-swagger v0.30.5
github.com/vbatts/git-validation v1.2.2 github.com/vbatts/git-validation v1.2.2
) )

View File

@ -57,8 +57,8 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cpuguy83/go-md2man/v2 v2.0.6 h1:XJtiaUW6dEEqVuZiMTn1ldk455QWwEIsMIJlo5vtkx0= github.com/cpuguy83/go-md2man/v2 v2.0.7 h1:zbFlGlXEAKlwXpmvle3d8Oe3YnkKIK4xSRTd3sHPnBo=
github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g= github.com/cpuguy83/go-md2man/v2 v2.0.7/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6NIQQ7OS05n1F4g=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=

View File

@ -1,6 +1,20 @@
# For documentation, see https://golangci-lint.run/usage/configuration/ # For documentation, see https://golangci-lint.run/usage/configuration/
linters: version: "2"
formatters:
enable: enable:
- gofumpt - gofumpt
linters:
enable:
- errorlint
- nolintlint
- unconvert
- unparam
settings:
staticcheck:
checks:
- all
- -QF1008 # https://staticcheck.dev/docs/checks/#QF1008 Omit embedded fields from selector expression.

View File

@ -8,7 +8,16 @@ Uses [blackfriday](https://github.com/russross/blackfriday) to process markdown
### Usage ### Usage
```bash ```bash
go install github.com/cpuguy83/go-md2man@latest go install github.com/cpuguy83/go-md2man/v2@latest
go-md2man -in /path/to/markdownfile.md -out /manfile/output/path go-md2man -in /path/to/markdownfile.md -out /manfile/output/path
``` ```
For go 1.24 and above, you can run it with `go tool`:
```bash
go get -tool github.com/cpuguy83/go-md2man/v2@latest
# it will be appended to `tool` directive in go.mod file
go tool go-md2man -in /path/to/markdownfile.md -out /manfile/output/path
```

View File

@ -1,3 +1,4 @@
// Package md2man aims in converting markdown into roff (man pages).
package md2man package md2man
import ( import (

View File

@ -47,13 +47,13 @@ const (
tableStart = "\n.TS\nallbox;\n" tableStart = "\n.TS\nallbox;\n"
tableEnd = ".TE\n" tableEnd = ".TE\n"
tableCellStart = "T{\n" tableCellStart = "T{\n"
tableCellEnd = "\nT}\n" tableCellEnd = "\nT}"
tablePreprocessor = `'\" t` tablePreprocessor = `'\" t`
) )
// NewRoffRenderer creates a new blackfriday Renderer for generating roff documents // NewRoffRenderer creates a new blackfriday Renderer for generating roff documents
// from markdown // from markdown
func NewRoffRenderer() *roffRenderer { // nolint: golint func NewRoffRenderer() *roffRenderer {
return &roffRenderer{} return &roffRenderer{}
} }
@ -316,9 +316,8 @@ func (r *roffRenderer) handleTableCell(w io.Writer, node *blackfriday.Node, ente
} else if nodeLiteralSize(node) > 30 { } else if nodeLiteralSize(node) > 30 {
end = tableCellEnd end = tableCellEnd
} }
if node.Next == nil && end != tableCellEnd { if node.Next == nil {
// Last cell: need to carriage return if we are at the end of the // Last cell: need to carriage return if we are at the end of the header row.
// header row and content isn't wrapped in a "tablecell"
end += crTag end += crTag
} }
out(w, end) out(w, end)

View File

@ -10,7 +10,7 @@ github.com/Masterminds/sprig/v3
# github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 # github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2
## explicit; go 1.13 ## explicit; go 1.13
github.com/asaskevich/govalidator github.com/asaskevich/govalidator
# github.com/cpuguy83/go-md2man/v2 v2.0.6 # github.com/cpuguy83/go-md2man/v2 v2.0.7
## explicit; go 1.12 ## explicit; go 1.12
github.com/cpuguy83/go-md2man/v2 github.com/cpuguy83/go-md2man/v2
github.com/cpuguy83/go-md2man/v2/md2man github.com/cpuguy83/go-md2man/v2/md2man