chore(diffview): TrimSuffix -> TrimRight

Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com>
This commit is contained in:
Andrey Nering
2025-07-23 15:38:28 -03:00
parent 90d1e2f159
commit 5c9f168b7f

View File

@@ -22,7 +22,7 @@ type chromaFormatter struct {
// Format implements the chroma.Formatter interface.
func (c chromaFormatter) Format(w io.Writer, style *chroma.Style, it chroma.Iterator) error {
for token := it(); token != chroma.EOF; token = it() {
value := strings.TrimSuffix(token.Value, "\n")
value := strings.TrimRight(token.Value, "\n")
value = ansiext.Escape(value)
entry := style.Get(token.Type)