diff --git a/index.js b/index.js
index e662321..e62f95e 100644
--- a/index.js
+++ b/index.js
@@ -6,7 +6,7 @@ const isSvg = input => {
return false;
}
- input = input.toString().trim();
+ input = input.toString().trim().replaceAll('\n', ' ');
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 => {