"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.findMark = void 0;
exports.isMarkActive = isMarkActive;
const findMark = (node, markType) => {
    return node.marks.find((mark) => mark.type.name === markType.name);
};
exports.findMark = findMark;
function isMarkActive(state, type) {
    const { from, $from, to, empty } = state.selection;
    if (empty) {
        return type.isInSet(state.storedMarks || $from.marks());
    }
    return state.doc.rangeHasMark(from, to, type);
}
//# sourceMappingURL=marks.js.map
