We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 034967d commit d46292dCopy full SHA for d46292d
index.js
@@ -6,7 +6,7 @@ const isSvg = input => {
6
return false;
7
}
8
9
- input = input.toString().trim();
+ input = input.toString().trim().replace(/\n/g, ' ');
10
11
if (input.length === 0) {
12
test.js
@@ -20,6 +20,13 @@ test('valid SVGs', t => {
20
<svg version="1.1">
21
</svg>
22
`));
23
+ t.true(isSvg(`<?xml version="1.0" encoding="UTF-8" standalone="no"?>
24
+<svg
25
+xmlns="http://www.w3.org/2000/svg"
26
+width="75"
27
+height="75"
28
+version="1.1"
29
+></svg>`));
30
});
31
32
test('invalid SVGs', t => {
0 commit comments