Skip to content
This repository was archived by the owner on Feb 19, 2025. It is now read-only.

Commit 0cf2415

Browse files
committed
Frixed wrong regex
1 parent 47c9df1 commit 0cf2415

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/PDFViewer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ const PDFViewer: React.FC<InputProps> = props => {
204204
moduleClient
205205
.getFileInfo(currentFileIdRef.current || "")
206206
.then(async (fileInfo: any) => {
207-
const linkRegex = /name="([a-zA-Z0-9-]+)"/gim;
207+
const linkRegex = /<link.+<\/link>/gim;
208208
const incomingXfdfWithoutLinks = fileInfo.xfdf.replaceAll(linkRegex, "");
209209
const previousXfdfWithoutLinks = previousXfdfRef.current.replaceAll(linkRegex, "");
210210
if (fileInfo.xfdf && incomingXfdfWithoutLinks !== previousXfdfWithoutLinks) {

0 commit comments

Comments
 (0)