import { closeHistory } from '@atlaskit/prosemirror-history';
export var createRule = function createRule(match, handler) {
  var allowsBackwardMatch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  return {
    match: match,
    handler: handler,
    onHandlerApply: function onHandlerApply(_state, tr) {
      closeHistory(tr);
    },
    allowsBackwardMatch: allowsBackwardMatch
  };
};