/**
 * Checks if a particular node fragment is supported in the parent
 * @param state EditorState
 * @param fragment The fragment to be checked for
 */
export var isSupportedInParent = function isSupportedInParent(state, fragment, currentAppearance) {
  var depth = currentAppearance === 'embed' || currentAppearance === 'block' ? undefined : -1;
  var parent = state.selection.$from.node(depth);
  return parent && parent.type.validContent(fragment);
};