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