mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #19122 from calixteman/issue19120
Correctly compute the mapping between text and normalized text when it contains a compound word on two lines
This commit is contained in:
commit
c784a24d45
4 changed files with 27 additions and 5 deletions
|
@ -282,8 +282,7 @@ function normalize(text) {
|
|||
|
||||
if (p5) {
|
||||
// Compound word with a line break after the hyphen.
|
||||
positions.push([i - shift + 3, 1 + shift]);
|
||||
shift += 1;
|
||||
// Since the \n isn't in the original text, o = 3 and n = 3.
|
||||
shiftOrigin += 1;
|
||||
eol += 1;
|
||||
return p5.replace("\n", "");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue