dist/marky-marked.js
function indexOfMatch(string, regex, index) {
  const str = index !== null ? string.substring(index) : string;
  const matches = str.match(regex);
  return matches ? str.indexOf(matches[0]) + index : -1;
}
function indexOfMatch(string, regex, index) {
  const str = index !== null ? string.substring(index) : string;
  const matches = str.match(regex);
  return matches ? str.indexOf(matches[0]) + index : -1;
}
function indexOfMatch ( string , regex , index ) { const str = index !== null ? string . substring ( index ) : string ; const matches = str . match ( regex ) ; return matches ? str . indexOf ( matches [ 0 ] ) + index : - 1 ; }
Finds the first index based on a regex match
@param   {RegExp} regex a regex object
@param   {Number} index optional starting index
@returns {Number} the index of the match
Finds the first index based on a regex match