Skip to content

Commit

Permalink
remove redundant tab replacement
Browse files Browse the repository at this point in the history
this already happens in the caller
  • Loading branch information
tmck-code committed Nov 27, 2024
1 parent 636a58c commit d4f9dff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pokesay/print.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ func printSpeechBubbleLine(boxCharacters *BoxCharacters, line string, width int,

// Prints line of text across multiple lines, wrapping it so that it doesn't exceed the desired width.
func printWrappedText(boxCharacters *BoxCharacters, line string, width int, tabSpaces string, drawBubble bool) {
for _, wline := range strings.Split(wordwrap.WrapString(strings.Replace(line, "\t", tabSpaces, -1), uint(width)), "\n") {
for _, wline := range strings.Split(wordwrap.WrapString(line, uint(width)), "\n") {
printSpeechBubbleLine(boxCharacters, wline, width, drawBubble)
}
}
Expand Down

0 comments on commit d4f9dff

Please sign in to comment.