diff --git a/index.js b/index.js
index e662321..7a610f4 100644
--- a/index.js
+++ b/index.js
@@ -6,7 +6,7 @@ const isSvg = input => {
return false;
}
- input = input.toString().trim();
+ input = input.toString().trim().replace(/\n/g, ' ');
if (input.length === 0) {
return false;
diff --git a/test.js b/test.js
index 7a53d27..3cca99e 100644
--- a/test.js
+++ b/test.js
@@ -20,6 +20,13 @@ test('valid SVGs', t => {
`));
+ t.true(isSvg(`
+`));
});
test('invalid SVGs', t => {