Only emit warnings for non-empty `<defs>` nodes.
Inkscape likes to put empty `<defs>` nodes in the file, which don't do
anything, so we technically support them.
@@ -156,8 +156,10 @@ impl BuiltSVG {
self.result_flags.insert(BuildResultFlags::UNSUPPORTED_CLIP_PATH_NODE);
}
NodeKind::Defs { .. } => {
+ if node.has_children() {
self.result_flags.insert(BuildResultFlags::UNSUPPORTED_DEFS_NODE);
}
+ }
NodeKind::Filter(..) => {
self.result_flags.insert(BuildResultFlags::UNSUPPORTED_FILTER_NODE);
}
