You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider the following text file containing a UTF character followed by newline:
β― cat foo.txt
β
Here is the hex dump for clarity:
β― xxd -p foo.txt
e294810a
Delta will interpret regular rg output just fine:
β― rg "" foo.txt | delta
β
But it will panic when using JSON output:
β― rg --json "" foo.txt | RUST_BACKTRACE=1 delta
thread 'main' panicked at src/handlers/grep.rs:389:50:
byte index 1 is not a char boundary; it is inside 'β' (bytes 0..3) of `β`
stack backtrace:
β’ foo.txt
0: _rust_begin_unwind
1: core::panicking::panic_fmt
2: core::str::slice_error_fail_rt
3: core::str::slice_error_fail
4: delta::handlers::grep::make_style_sections
5: delta::handlers::grep::<impl delta::delta::StateMachine>::handle_grep_line
6: delta::delta::delta
7: delta::main
note: Some details are omitted, run with `RUST_BACKTRACE=full`for a verbose backtrace.
The text was updated successfully, but these errors were encountered:
Consider the following text file containing a UTF character followed by newline:
Here is the hex dump for clarity:
Delta will interpret regular
rg
output just fine:But it will panic when using JSON output:
The text was updated successfully, but these errors were encountered: