I know screen mode escapes are not supported and I don't need them to be parsed, however I noticed that the parser gets stuck on screen mode escapes (starting with \x1b[= or \x1b[?). I don't know whether the right handling of these would be to leave them as they are or remove them. Here is a test function that gets stuck:
#[test]
fn test_screen_modes() {
let bytes: Vec<u8> = b"\x1b[?25hAAABBB".to_vec();
let output = Ok(Text::from(Spans::from(Span::styled(
"\x1b[?25hAAABBB", // or "AAABBB"
Style::default()
))));
assert_eq!(bytes.into_text(), output);
}
I know screen mode escapes are not supported and I don't need them to be parsed, however I noticed that the parser gets stuck on screen mode escapes (starting with
\x1b[=
or\x1b[?
). I don't know whether the right handling of these would be to leave them as they are or remove them. Here is a test function that gets stuck: