Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make printed table markdown-friendly #78

Merged
merged 1 commit into from Jul 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions printer/printer.go
Expand Up @@ -14,10 +14,10 @@ import (
// configurePrinterStyling accepts a pointer to a table printer and sets up the styles commonly used across them
// resulting in uniform tabular output to STDOUT following each run of the CLI
func configurePrinterStyling(printer *tableprinter.Printer) {
printer.BorderTop, printer.BorderBottom, printer.BorderLeft, printer.BorderRight = true, true, true, true
printer.CenterSeparator = ""
printer.ColumnSeparator = ""
printer.RowSeparator = ""
printer.BorderTop, printer.BorderBottom, printer.BorderLeft, printer.BorderRight = false, false, true, true
printer.CenterSeparator = "|"
printer.ColumnSeparator = "|"
printer.RowSeparator = "-"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we just use different characters because of our different operating systems, but I always have to sed these manually.

printer.HeaderBgColor = tablewriter.BgBlackColor
printer.HeaderFgColor = tablewriter.FgGreenColor
}
Expand Down