mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Ignore the URLs when checking if inferred links overlap existing LinkAnnotations (PR 19110 follow-up)
*Note:* For the issue mentioned on Matrix it'll obviously still make sense to improve the regular expression to detect more URL edge-cases. However it occurred to me that even once that particular case is fixed there'll always be a risk that inferred links could overlap, and effectively block, the actual LinkAnnotations. Hence this patch removes the URL comparison to ensure that overlapping inferred links will always be ignored.
This commit is contained in:
parent
b4a6b1ba0b
commit
37ef0b4a86
5 changed files with 36 additions and 1 deletions
|
@ -327,7 +327,7 @@ class AnnotationLayerBuilder {
|
|||
for (const annotation of this.#annotations) {
|
||||
if (
|
||||
annotation.annotationType !== AnnotationType.LINK ||
|
||||
annotation.url !== link.url
|
||||
!annotation.url
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -353,6 +353,7 @@ const PDFViewerApplication = {
|
|||
// Set some specific preferences for tests.
|
||||
if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("TESTING")) {
|
||||
Object.assign(opts, {
|
||||
docBaseUrl: x => x,
|
||||
enableAltText: x => x === "true",
|
||||
enableAutoLinking: x => x === "true",
|
||||
enableFakeMLManager: x => x === "true",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue