code: function(match, matchIndex, characterOffset) {
  
        if (!match[0]) {
          throw new Error('findAndReplaceDOMText cannot handle zero-length matches')
        }
     
        match.endIndex = characterOffset + match.index + match[0].length
        match.startIndex = characterOffset + match.index
        match.index = matchIndex
        return match
      }
docs: Prepares a single match with useful meta info: