Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package riff for openSUSE:Factory checked in at 2026-01-19 18:38:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/riff (Old) and /work/SRC/openSUSE:Factory/.riff.new.1928 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "riff" Mon Jan 19 18:38:04 2026 rev:28 rq:1328026 version:3.6.1 Changes: -------- --- /work/SRC/openSUSE:Factory/riff/riff.changes 2025-11-09 21:10:06.604686495 +0100 +++ /work/SRC/openSUSE:Factory/.riff.new.1928/riff.changes 2026-01-19 18:42:09.920138328 +0100 @@ -1,0 +2,9 @@ +Mon Jan 19 08:23:41 UTC 2026 - Michael Vetter <[email protected]> + +- Update to 3.6.1: + * Before this release, piped riff output could contain OSC hyperlinks, + potentially messing up for other tools. + With this release, riff will no longer emit hyperlinks when its + output is not a terminal. + +------------------------------------------------------------------- Old: ---- riff-3.6.0.tar.zst New: ---- riff-3.6.1.tar.zst ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ riff.spec ++++++ --- /var/tmp/diff_new_pack.PeqaCx/_old 2026-01-19 18:42:10.604166630 +0100 +++ /var/tmp/diff_new_pack.PeqaCx/_new 2026-01-19 18:42:10.604166630 +0100 @@ -1,7 +1,7 @@ # # spec file for package riff # -# Copyright (c) 2025 SUSE LLC and contributors +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: riff -Version: 3.6.0 +Version: 3.6.1 Release: 0 Summary: A diff filter highlighting which line parts have changed License: MIT ++++++ _service ++++++ --- /var/tmp/diff_new_pack.PeqaCx/_old 2026-01-19 18:42:10.656168782 +0100 +++ /var/tmp/diff_new_pack.PeqaCx/_new 2026-01-19 18:42:10.664169113 +0100 @@ -3,7 +3,7 @@ <param name="url">https://github.com/walles/riff.git</param> <param name="versionformat">@PARENT_TAG@</param> <param name="scm">git</param> - <param name="revision">3.6.0</param> + <param name="revision">3.6.1</param> <param name="match-tag">*</param> <param name="versionrewrite-pattern">v(\d+\.\d+\.\d+)</param> <param name="versionrewrite-replacement">\1</param> ++++++ riff-3.6.0.tar.zst -> riff-3.6.1.tar.zst ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/riff-3.6.0/Cargo.lock new/riff-3.6.1/Cargo.lock --- old/riff-3.6.0/Cargo.lock 2025-11-05 18:40:03.000000000 +0100 +++ new/riff-3.6.1/Cargo.lock 2025-11-17 20:58:21.000000000 +0100 @@ -570,7 +570,7 @@ [[package]] name = "riffdiff" -version = "3.6.0" +version = "3.6.1" dependencies = [ "backtrace", "base64", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/riff-3.6.0/Cargo.toml new/riff-3.6.1/Cargo.toml --- old/riff-3.6.0/Cargo.toml 2025-11-05 18:40:03.000000000 +0100 +++ new/riff-3.6.1/Cargo.toml 2025-11-17 20:58:21.000000000 +0100 @@ -2,7 +2,7 @@ [package] name = "riffdiff" # Actually "riff", but that was already taken on crates.io -version = "3.6.0" +version = "3.6.1" authors = ["Johan Walles <[email protected]>"] edition = "2018" repository = "https://github.com/walles/riff/" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/riff-3.6.0/src/ansi.rs new/riff-3.6.1/src/ansi.rs --- old/riff-3.6.0/src/ansi.rs 2025-11-05 18:40:03.000000000 +0100 +++ new/riff-3.6.1/src/ansi.rs 2025-11-17 20:58:21.000000000 +0100 @@ -150,40 +150,59 @@ Normal, Escape, EscapeBracket, + Osc, + OscSequence, } let mut state = State::Normal; let mut without_ansi = Vec::with_capacity(line.len()); - - for byte in line { + let mut i = 0; + while i < line.len() { + let byte = line[i]; match state { State::Normal => { - if *byte == b'\x1b' { + if byte == b'\x1b' { state = State::Escape; } else { - without_ansi.push(*byte); + without_ansi.push(byte); } } State::Escape => { - if *byte == b'[' { + if byte == b'[' { state = State::EscapeBracket; + } else if byte == b']' { + state = State::Osc; } else { // Not an ANSI sequence state = State::Normal; - - // Push the characters that we thought were the escape - // sequence's opening without_ansi.push(b'\x1b'); - without_ansi.push(*byte); + without_ansi.push(byte); } } State::EscapeBracket => { - if !byte.is_ascii_digit() && *byte != b';' { - // Neither digit nor semicolon, this marks the end of the sequence + if !byte.is_ascii_digit() && byte != b';' { + // End of SGR sequence state = State::Normal; } } + State::Osc => { + // OSC sequence, look for the next '\x1b\\' (ST) + // OSC 8 is hyperlink, but we strip all OSC for now + // Find the next '\x1b' followed by '\\' + // We are at the ']' after '\x1b', so skip until we see '\x1b\\' + state = State::OscSequence; + } + State::OscSequence => { + // Look for '\x1b\\' (ST) + if byte == b'\x1b' && i + 1 < line.len() && line[i + 1] == b'\\' { + // End of OSC sequence + state = State::Normal; + i += 1; // Skip the '\\' as well + } + // Otherwise, keep skipping + } } + i += 1; } return without_ansi; @@ -215,6 +234,18 @@ } #[test] + fn test_strip_hyperlink() { + // OSC 8 hyperlink: \x1b]8;;https://example.com\x1b\\ + let line = b"foo\x1b]8;;https://example.com\x1b\\bar".to_vec(); + // Expect "foobar" after removing OSC 8 hyperlink + assert_eq!(without_ansi_escape_codes(&line), b"foobar"); + + // OSC 8 hyperlink removal: \x1b]8;;\x1b\\ + let line2 = b"foo\x1b]8;;\x1b\\bar".to_vec(); + assert_eq!(without_ansi_escape_codes(&line2), b"foobar"); + } + + #[test] fn test_from_hyperlinked() { use url::Url; ++++++ vendor.tar.zst ++++++ /work/SRC/openSUSE:Factory/riff/vendor.tar.zst /work/SRC/openSUSE:Factory/.riff.new.1928/vendor.tar.zst differ: char 7, line 1
