function hasBlock(regExp, state) {
  const { focusText } = state;
  const focusedText = focusText.text;
  return regExp.test(focusedText);
}
/**
 * Has block selected
 *
 * @param regExp - match regexp
 * @param state - editor state
 */
Has block selected
@param regExp - match regexp
@param state - editor state
Has block selected @param regExp - match regexp @param state - editor state
function hasBlock(regExp, state) {
  const { focusText } = state;
  const focusedText = focusText.text;
  return regExp.test(focusedText);
}
function hasBlock ( regExp , state ) { const { focusText } = state ; const focusedText = focusText . text ; return regExp . test ( focusedText ) ; }
Has block selected
 @param regExp - match regexp
 @param state - editor state
Has block selected @param regExp - match regexp @param state - editor state