From 8719a5974f817b616c464fb6c6613fa57a7dfb06 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 31 May 2023 10:23:41 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/8403 --- app/src/asset/anno.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/asset/anno.ts b/app/src/asset/anno.ts index e3639b7d3..e96d4c9d4 100644 --- a/app/src/asset/anno.ts +++ b/app/src/asset/anno.ts @@ -331,8 +331,8 @@ const getHightlightCoordsByRange = (pdf: any, color: string) => { } } }); - const content = Lute.EscapeHTMLStr(rangeContents.textContent); - + // eslint-disable-next-line no-control-regex + const content = Lute.EscapeHTMLStr(rangeContents.textContent.replace(/[\x00]|\n/g, "")); const startPage = pdf.pdfViewer.getPageView(startIndex); const startPageRect = startPage.canvas.getClientRects()[0]; const startViewport = startPage.viewport;