aboutsummaryrefslogtreecommitdiff
path: root/node_modules/svgo/plugins/removeXMLProcInst.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/svgo/plugins/removeXMLProcInst.js')
-rw-r--r--node_modules/svgo/plugins/removeXMLProcInst.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/node_modules/svgo/plugins/removeXMLProcInst.js b/node_modules/svgo/plugins/removeXMLProcInst.js
new file mode 100644
index 00000000..afd425d5
--- /dev/null
+++ b/node_modules/svgo/plugins/removeXMLProcInst.js
@@ -0,0 +1,24 @@
+'use strict';
+
+exports.type = 'perItem';
+
+exports.active = true;
+
+exports.description = 'removes XML processing instructions';
+
+/**
+ * Remove XML Processing Instruction.
+ *
+ * @example
+ * <?xml version="1.0" encoding="utf-8"?>
+ *
+ * @param {Object} item current iteration item
+ * @return {Boolean} if false, item will be filtered out
+ *
+ * @author Kir Belevich
+ */
+exports.fn = function(item) {
+
+ return !(item.processinginstruction && item.processinginstruction.name === 'xml');
+
+};