Skip to content

Commit

Permalink
Merge pull request svg#211 from roadhump/issue_additionalnamespaces
Browse files Browse the repository at this point in the history
additionalNamespaces param for removeEditorsNSData plugin
  • Loading branch information
GreLI committed Aug 2, 2014
2 parents 56e140e + 511828e commit 68bfa2d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion plugins/removeEditorsNSData.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ exports.active = true;
var editorNamespaces = require('./_collections').editorNamespaces,
prefixes = [];

exports.params = {
additionalNamespaces: []
};

/**
* Remove editors namespaces, elements and attributes.
*
Expand All @@ -16,11 +20,16 @@ var editorNamespaces = require('./_collections').editorNamespaces,
* <path sodipodi:nodetypes="cccc"/>
*
* @param {Object} item current iteration item
* @param {Object} params plugin params
* @return {Boolean} if false, item will be filtered out
*
* @author Kir Belevich
*/
exports.fn = function(item) {
exports.fn = function(item, params) {

if (Array.isArray(params.additionalNamespaces)) {
editorNamespaces = editorNamespaces.concat(params.additionalNamespaces);
}

if (item.elem) {

Expand Down

0 comments on commit 68bfa2d

Please sign in to comment.