code: function inlineRegex(regex) {
    return function match(source, state) {
      if (state.inline) {
        return regex.exec(source);
      } else {
        return null;
      }
    };
  }
docs: Creates a match function for an inline scoped or simple element from a regex