Skip to content

Commit

Permalink
Fix ApplyStrf using a new styler instance
Browse files Browse the repository at this point in the history
  • Loading branch information
coldfgirl committed Oct 12, 2024
1 parent f54f61c commit b14f192
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion style_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ func (s *styleSet) ApplyStr(original string) (output string) {
// ApplyStrf will call Apply while casting the arguments to/from strings and using fmt.Sprintf.
// There is a reasonable performance hit to this over Apply.
func (s *styleSet) ApplyStrf(format string, args ...any) (output string) {
return fmt.Sprintf(string(NewStyler().Apply([]rune(format))), args...)
return fmt.Sprintf(string(s.Apply([]rune(format))), args...)
}

// parseOpening operates similarly to checkSequence but specifically for the opening of a style tag.
Expand Down

0 comments on commit b14f192

Please sign in to comment.