Attach (recommended) or Link to PDF file here:
[NHA-20211231-A-018_before.pdf](https://github.com/mozilla/pdf.js/files/8055863/NHA-20211231-A-018_before.pdf)

Configuration:
- Web browser and its version: Firefox nightly
- Operating system and its version: Windows 11

Steps to reproduce the problem:
1. Search for "a"
2. Some highlighter results are wrong

![image](https://user-images.githubusercontent.com/5641725/153760070-61708a75-524c-4a21-bc1f-7745e9151b97.png)

After investigations some results are shifted because of a bug with "-\n".
G_EXP = ^\p{M}*([^\p{M}])u;
let normalizationRegex = null;
function normalize(text) {
  
  
  
  if (!normalizationRegex) {
    
    const replace = Object.keys(CHARACTERS_TO_NORMALIZE).join("");
    normalizationRegex = new RegExp(
      `([${replace}])|(\\S-\\n)|(\\n)|(\\p{M}+)`,
      "gum"
    );
  }
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  const rawDiacriticsPositions = [];
  let m;
  while ((m = DIACRITICS_REG_EXP.exec(text)) !== null) {
    rawDiacriticsPositions.push([m[0].length, m.index]);
  }
  let normalized = text.normalize("NFD");
  const positions = [[0, 0]];
  let k = 0;
  let shift = 0;
  let shiftOrigin = 0;
  let eol = 0;
  let hasDiacritics = false;
  normalized = normalized.replace(
    normalizationRegex,
    (match, p1, p2, p3, p4, i) => {
      i -= shiftOrigin;
      if (p1) {
        
        const replacement = CHARACTERS_TO_NORMALIZE[match];
        const jj = replacement.length;
        for (let j = 1; j < jj; j++) {
          positions.push([i - shift + j, shift - j]);
        }
        shift -= jj - 1;
        return replacement;
      }
      if (p2) {
        
        
        
        positions.push([i - shift, 1 + shift]);
        shift += 1;
        shiftOrigin += 1;
        eol += 1;
        return p2.charAt(0);
      }
      if (p3) {
        
        
        positions.push([i - shift + 1, shift - 1]);
        shift -= 1;
        shiftOrigin += 1;
        eol += 1;
        return " ";
      }
      
      hasDiacritics = true;
      let jj = p4.length;
      if (i + eol === rawDiacriticsPositions[k]?.[1]) {
        jj -= rawDiacriticsPositions[k][0];
        ++k;
      }
      for (let j = 1; j < jj + 1; j++) {
        
        
        positions.push([i - 1 - shift + j, shift - j]);
      }
      shift -= jj;
      shiftOrigin += jj;
      return p4;
    }
  );
  positions.push([normalized.length, shift]);
  return [normalized, positions, hasDiacritics];
}
function getOriginalIndex(diffs,