1
0
mirror of https://github.com/svg/svgo.git synced 2025-08-09 02:22:08 +03:00

Convert element children to xast

Ref https://github.com/syntax-tree/xast

Renamed content to children to match xast spec.
This commit is contained in:
Bogdan Chadkin
2021-03-11 01:49:00 +03:00
parent b9a682443c
commit 5314c12c99
28 changed files with 249 additions and 235 deletions

View File

@@ -60,10 +60,10 @@ exports.fn = function (data) {
}
function monkeys(items, fn) {
items.content.forEach(function (item) {
items.children.forEach(function (item) {
fn(item);
if (item.content) {
if (item.children) {
monkeys(item, fn);
}
});