Skip to content

Commit

Permalink
Keep empty <mask> which can hide element by id
Browse files Browse the repository at this point in the history
  • Loading branch information
TrySound committed Feb 24, 2021
1 parent 3639156 commit d14315b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/removeEmptyContainers.js
Expand Up @@ -32,6 +32,8 @@ exports.fn = function(item) {
(item.isElem('pattern') && item.hasAttrLocal('href')) ||
// The 'g' may not have content, but the filter may cause a rectangle
// to be created and filled with pattern.
(item.isElem('g') && item.hasAttr('filter'))
(item.isElem('g') && item.hasAttr('filter')) ||
// empty <mask> hides masked element
(item.isElem('mask') && item.hasAttr('id'))
);
};
13 changes: 13 additions & 0 deletions test/plugins/removeEmptyContainers.05.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d14315b

Please sign in to comment.