wrapMatchesAcrossElements(regex, ignoreGroups, filterCb, eachCb, endCb) {
    const matchIdx = ignoreGroups === 0 ? 0 : ignoreGroups + 1;
    this.getTextNodes(dict => {
      let match;
      while (
        (match = regex.exec(dict.value)) !== null &&
        match[matchIdx] !== ''
      ) {
        // calculate range inside dict.value
        let start = match.index;
        if (matchIdx !== 0) {
          for (let i = 1; i < matchIdx; i++) {
            start += match[i].length;
          }
        }
        const end = start + match[matchIdx].length;
        // note that dict will be updated automatically, as it'll change
        // in the wrapping process, due to the fact that text
        // nodes will be splitted
        this.wrapRangeInMappedTextNode(dict, start, end, node => {
          return filterCb(match[matchIdx], node);
        }, (node, lastIndex) => {
          regex.lastIndex = lastIndex;
          eachCb(node);
        });
      }
      endCb();
    });
  }
Wraps the instance element and class around matches across all HTML
elements in all contexts
@param {RegExp} regex - The regular expression to be searched for
@param {number} ignoreGroups - A number indicating the amount of RegExp
matching groups to ignore
@param {Mark~wrapMatchesAcrossElementsFilterCallback} filterCb
@param {Mark~wrapMatchesAcrossElementsEachCallback} eachCb
@param {Mark~wrapMatchesAcrossElementsEndCallback} endCb
@access protected