Skip to content

Commit

Permalink
include burlywood in test, and modify searchstring
Browse files Browse the repository at this point in the history
  • Loading branch information
joda-divid committed Oct 21, 2021
1 parent c47575f commit a831ca9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const svgEncoded =
"</linearGradient>" +
"</defs>" +
'<svg> <rect x="0" y="0" width="20" height="20" fill="url(#GradientRed)"/></svg>' +
'<svg> <rect x="30" y="30" width="20" height="20" fill="Burlywood"/></svg>' +
"</svg>";

const imageResource = {
Expand Down Expand Up @@ -74,6 +75,14 @@ export const test: ExportTestDef = {
x: 0,
y: 0,
},
{
clr: -1,
h: 4,
oc: "#deb887",
w: 4,
x: 6,
y: 6,
},
],
HLines: [],
Height: 52.625,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function abstractComponentToPdf(
index = indexEnd;

const color = svgUpdated.substring(indexStart, indexEnd);
if (color !== color.toLowerCase() && color.toLowerCase().indexOf("url") === -1)
if (color !== color.toLowerCase() && color.toLowerCase().indexOf("url(") === -1)
svgUpdated =
svgUpdated.substring(0, indexStart) +
color.toLowerCase() +
Expand Down

0 comments on commit a831ca9

Please # to comment.