@@ -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)