mirror of
https://github.com/wez/wezterm.git
synced 2024-12-23 05:12:40 +03:00
sixel: allow slightly poorly formed sixel data
The issue appears to be due to a rogue trailing semicolon in the input data. Support for this appears to be mixed: an online converter didn't produce valid output, but image magick's convert utility accepted it. This commit allows an optional trailing semicolon at the end of the color definition regex and enables wezterm to render the image. refs: https://github.com/wez/wezterm/issues/1711
This commit is contained in:
parent
737eb6e912
commit
0fcdea0789
@ -358,7 +358,7 @@ impl SixelBuilder {
|
||||
|
||||
let repeat_re = Regex::new("^!(\\d+)([\x3f-\x7e])").unwrap();
|
||||
let raster_re = Regex::new("^\"(\\d+);(\\d+)(;(\\d+))?(;(\\d+))?").unwrap();
|
||||
let colordef_re = Regex::new("^#(\\d+);(\\d+);(\\d+);(\\d+);(\\d+)").unwrap();
|
||||
let colordef_re = Regex::new("^#(\\d+);(\\d+);(\\d+);(\\d+);(\\d+);?").unwrap();
|
||||
let coloruse_re = Regex::new("^#(\\d+)([^;\\d]|$)").unwrap();
|
||||
|
||||
Self {
|
||||
|
Loading…
Reference in New Issue
Block a user