Attach (recommended) or Link to PDF file here:
https://www.meti.go.jp/policy/consumer/seian/denan/file/04_cn/scope/haninokaishaku_211228.pdf

Configuration:
- Web browser and its version: Google Chrome 107.0.5304.121
- Operating system and its version: Windows 10 Pro 21H2 19044.1826
- PDF.js version: v3.0.279
- Is a browser extension: No

Steps to reproduce the problem:
1. Search "ソレノイド" by Ctrl+F.

What went wrong? (add screenshot)
"ソレノイド" on page 10 must be hit.
If search "ソ レノイド" (add space between ソ and レ), it hits.

![image](https://user-images.githubusercontent.com/110510565/204415638-450c0b28-ce1e-4542-8f4d-7b67fe881f6d.png)

Steps to reproduce the problem:
1. Search "ミシン用として用いられる" by Ctrl+F.

What went wrong? (add screenshot)
"ミシン用として用いられる" on page 5 must be hit.
If search "ミシン用として用いられ る" (add space between れ and る), it hits.

![image](https://user-images.githubusercontent.com/110510565/204416640-824b8f3f-9b7b-4ba5-856c-858d8d451689.png)

When this PDF file is opened by Adobe Reader, there is no problem.

Related issue:
[#15340](https://github.com/mozilla/pdf.js/issues/15340)






          pageNumber >= 1 &&
          pageNumber <= linkService.pagesCount &&
          pageNumber !== linkService.page &&
          !linkService.isPageVisible(pageNumber)
        ) {
          return true;
        }
        return false;
      case "highlightallchange":
        return false;
    }
    return true;
  }
  **
   * Determine if the search query constitutes a "whole word", by comparing the
   * firstlast character type with the precedingfollowing character type.
   *
  #isEntireWord(content, startIdx, length) {
    let match = content
      .slice(0, startIdx)
      .match(NOT_DIACRITIC_FROM_END_REG_EXP);
    if (match) {
      const first = content.charCodeAt(startIdx);
      const limit = match[1].charCodeAt(0);
      if (getCharacterType(first) === getCharacterType(limit)) {
        return false;
      }
    }
    match = content
      .slice(startIdx + length)
      .match(NOT_DIACRITIC_FROM_START_REG_EXP);
    if (match) {
      const last = content.charCodeAt(startIdx + length - 1);
      const limit = match[1].charCodeAt(0);
      if (getCharacterType(last) === getCharacterType(limit)) {
        return false;
      }
    }
    return true;
  }
  #calculateRegExpMatch(query, entireWord, pageIndex, pageContent) {
    const matches = [],
      matchesLength = [];
    const diffs = this._pageDiffs[pageIndex];
    let match;
    while ((match = query.exec(pageContent)) !== null) {
      if (
        entireWord &&
        !this.#isEntireWord(pageContent, match.index, match[0].length)
      ) {
        continue;
      }
      const [matchPos, matchLen] = getOriginalIndex(
        diffs,
        match.index,
        match[0].length
      );
      if (matchLen) {
        matches.push(matchPos);
        matchesLength.push(matchLen);
      }
    }
    this._pageMatches[pageIndex] = matches;
    this._pageMatchesLength[pageIndex] = matchesLength;
  }
  #convertToRegExpString(query, hasDiacritics) {
    const { matchDiacritics } = this._state;
    let isUnic