mirror of
https://github.com/svg/svgo.git
synced 2025-07-29 20:21:14 +03:00
Prepare root and element nodes for xast
Ref https://github.com/syntax-tree/xast - added type: root | element - renamed elem to name - replaced "elem" property checks with check for correct type
This commit is contained in:
@ -39,7 +39,7 @@ exports.fn = function (item) {
|
||||
hasTransform = false,
|
||||
hasClip = item.hasAttr('clip-path') || item.hasAttr('mask'),
|
||||
intersected = item.content.every(function (inner) {
|
||||
if (inner.isElem() && inner.hasAttr()) {
|
||||
if (inner.type === 'element' && inner.hasAttr()) {
|
||||
// don't mess with possible styles (hack until CSS parsing is implemented)
|
||||
if (inner.hasAttr('class')) return false;
|
||||
if (!Object.keys(intersection).length) {
|
||||
|
Reference in New Issue
Block a user