diff --git a/src/graphics/imagegraphics.jl b/src/graphics/imagegraphics.jl index a085bc85..4ece5ee3 100644 --- a/src/graphics/imagegraphics.jl +++ b/src/graphics/imagegraphics.jl @@ -49,10 +49,10 @@ function preprocess!(io::IO, c::ImageGraphics) else ImageInTerminal.imshow(ctx, c.img) lines_colors = readlines(ctx) # characters and ansi colors - re_bg_24bit = r"\e\[38;2;(\d+);(\d+);(\d+);48;2;(\d+);(\d+);(\d+)[\d;]*?m" - re_bg_8bit = r"\e\[38;5;(\d+);48;5;(\d+)[\d;]*?m" - re_fg_24bit = r"\e\[38;2;(\d+);(\d+);(\d+)[\d;]*?m" - re_fg_8bit = r"\e\[38;5;(\d+)[\d;]*?m" + re_bg_24bit = r"\e\[38;2;(\d+);(\d+);(\d+);48;2;(\d+);(\d+);(\d+)m" + re_bg_8bit = r"\e\[38;5;(\d+);48;5;(\d+)m" + re_fg_24bit = r"\e\[38;2;(\d+);(\d+);(\d+)m" + re_fg_8bit = r"\e\[38;5;(\d+)m" line1 = first(lines_colors) nc = line1 |> no_ansi_escape |> length invalid = m -> INVALID_COLOR diff --git a/test/tst_imageplot.jl b/test/tst_imageplot.jl index 3f8de4fa..6fa7ff19 100644 --- a/test/tst_imageplot.jl +++ b/test/tst_imageplot.jl @@ -10,7 +10,7 @@ img = testimage("monarch_color_256") end # experimental testing: see github.com/JuliaLang/Pkg.jl/pull/3186 -# must launched with `Pkg.test("UnicodePlots"; forward_stdin=true)` on `1.8`+ +# must be launched with `Pkg.test("UnicodePlots"; forward_stdin=true)` on `1.8`+ if ImageInTerminal.Sixel.is_sixel_supported() @testset "sixel" begin _old_enc = ImageInTerminal.ENCODER_BACKEND[]