/*!
 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
 * Licensed under the MIT License.
 */
import { MarkListFactory } from "./markListFactory";
import { withNodeChange } from "./utils";
export function prune(changeset, pruneNode) {
    const pruned = new MarkListFactory();
    for (const mark of changeset) {
        if (mark.changes !== undefined) {
            pruned.push(withNodeChange(mark, pruneNode(mark.changes)));
        }
        else {
            pruned.push(mark);
        }
    }
    return pruned.list;
}
//# sourceMappingURL=prune.js.map