on main help sign in
chore(diffview): `TrimSuffix` -> `TrimRight`

Co-authored-by: Ayman Bagabas <ayman.bagabas@gmail.com>

commit5c9f168b7f1fe62e352b7fc70aa48ac5f14c31a3 authorAndrey Nering <andreynering@users.noreply.github.com> dateWed 23 Jul 2025, 15:38 (1 year ago) parent90d1e2f
1 file changed+1−1
internal/tui/exp/diffview/chroma.go+1−1
internal/tui/exp/diffview/chroma.go+1−1
@@ -22,7 +22,7 @@ type chromaFormatter struct {
2222// Format implements the chroma.Formatter interface.
2323func (c chromaFormatter) Format(w io.Writer, style *chroma.Style, it chroma.Iterator) error {
2424 for token := it(); token != chroma.EOF; token = it() {
25− value := strings.TrimSuffix(token.Value, "\n")
25+ value := strings.TrimRight(token.Value, "\n")
2626 value = ansiext.Escape(value)
2727
2828 entry := style.Get(token.Type)