diff --git a/src/pokesay/print.go b/src/pokesay/print.go index 96be656..0e56d71 100644 --- a/src/pokesay/print.go +++ b/src/pokesay/print.go @@ -139,20 +139,9 @@ func printSpeechBubble(boxChars *BoxChars, scanner *bufio.Scanner, args Args) { // Prints a single speech bubble line func printSpeechBubbleLine(boxChars *BoxChars, line string, args Args) { - if args.DrawBubble { - lineLength := UnicodeStringLength(line) - if lineLength > args.Width { - fmt.Printf("%s %s\n", boxChars.VerticalEdge, line) - } else if lineLength == args.Width { - fmt.Printf("%s %s %s\n", boxChars.VerticalEdge, line, boxChars.VerticalEdge) - } else { - fmt.Printf( - "%s %s%s %s\n", - boxChars.VerticalEdge, line, strings.Repeat(" ", args.Width-lineLength), boxChars.VerticalEdge, - ) - } - } else { + if !args.DrawBubble { fmt.Println(line) + return } lineLen := UnicodeStringLength(line)