diff --git a/lib/util/parse.js b/lib/util/parse.js
index b9b2fc8..a7f84d6 100644
--- a/lib/util/parse.js
+++ b/lib/util/parse.js
@@ -8,6 +8,8 @@ var SVG_START = '';
+ unwrap = true;
+ }
+
+ var parsed = parseDocument(svg);
+
+ if (!unwrap) {
+ return parsed;
+ }
+
+ var fragment = document.createDocumentFragment();
+
+ var parent = parsed.firstChild;
+
+ while (parent.firstChild) {
+ fragment.appendChild(parent.firstChild);
}
- return parseDocument(svg);
+ return fragment;
}
function parseDocument(svg) {
diff --git a/test/spec/create.js b/test/spec/create.js
index 6bc6fbf..c17536d 100644
--- a/test/spec/create.js
+++ b/test/spec/create.js
@@ -34,7 +34,7 @@ describe('create', function() {
});
- it('should create element from SVG markup', function() {
+ it('should create