more tests for indent and wrap

This commit is contained in:
Kovid Goyal
2022-09-03 14:40:49 +05:30
parent af7f4e97cf
commit 3d79eb5730
3 changed files with 16 additions and 8 deletions

View File

@@ -232,7 +232,9 @@ func prettify(text string) string {
}
func format_with_indent(output io.Writer, text string, indent string, screen_width int) {
io.WriteString(output, style.WrapText(prettify(text), indent, screen_width, "#placeholder_for_formatting#"))
text = prettify(text)
indented := style.WrapText(text, indent, screen_width, "#placeholder_for_formatting#")
io.WriteString(output, indented)
}
func full_command_name(cmd *cobra.Command) string {