searchAll(str, options = {}) {
    const highlightIndexes = [];

    const continueSearch = (str, options) => {
      const highlightIndex = this.search(str, options);

      if (highlightIndex !== -1) {
        highlightIndexes.push(highlightIndex);
        options.directSearchOptions = options.directSearchOptions || {};
        options.directSearchOptions.lastHighlightIndex = highlightIndex;
        continueSearch(str, options);
      }
    };

    continueSearch(str, options);
    return highlightIndexes;
  }
// only support direct search for now
only support direct search for now
only support direct search for now
searchAll(str, options = {}) {
    const highlightIndexes = [];
    const continueSearch = (str, options) => {
      const highlightIndex = this.search(str, options);
      if (highlightIndex !== -1) {
        highlightIndexes.push(highlightIndex);
        options.directSearchOptions = options.directSearchOptions || {};
        options.directSearchOptions.lastHighlightIndex = highlightIndex;
        continueSearch(str, options);
      }
    };
    continueSearch(str, options);
    return highlightIndexes;
  }
searchAll ( str , options = { } ) { const highlightIndexes = [ ] ; const continueSearch = ( str , options ) => { const highlightIndex = this . search ( str , options ) ; if ( highlightIndex !== - 1 ) { highlightIndexes . push ( highlightIndex ) ; options . directSearchOptions = options . directSearchOptions || { } ; options . directSearchOptions . lastHighlightIndex = highlightIndex ; continueSearch ( str , options ) ; } } ; continueSearch ( str , options ) ; return highlightIndexes ; }
only support direct search for now
only support direct search for now