From fcf871e6378e5590178318f47b006a8def217e6b Mon Sep 17 00:00:00 2001 From: Fabrizio Monti Date: Tue, 16 Feb 2021 10:26:31 +0100 Subject: [PATCH] Identify svg files that start with white spaces --- lib/fastimage.rb | 2 +- test/fixtures/test5.svg | 1 + test/test.rb | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 test/fixtures/test5.svg diff --git a/lib/fastimage.rb b/lib/fastimage.rb index 2e51766..d6d8671 100644 --- a/lib/fastimage.rb +++ b/lib/fastimage.rb @@ -547,7 +547,7 @@ class FastImage :webp if @stream.peek(12)[8..11] == "WEBP" when "Logo-Bw diff --git a/test/test.rb b/test/test.rb index 894fda2..f0c68a0 100644 --- a/test/test.rb +++ b/test/test.rb @@ -39,6 +39,7 @@ GoodFixtures = { "test2.svg" => [:svg, [366, 271]], "test3.svg" => [:svg, [255, 48]], "test4.svg" => [:svg, [271, 271]], + "test5.svg" => [:svg, [255, 48]], "orient_6.jpg"=>[:jpeg, [1250,2500]] }