From 596ea4691642a22152d04a4fff239dfef8aa5b28 Mon Sep 17 00:00:00 2001
From: Xwite <1797350009@qq.com>
Date: Tue, 9 May 2023 18:19:18 +0800
Subject: [PATCH] =?UTF-8?q?fix(web):=20=E5=AD=97=E6=95=B0=E8=AE=A1?=
=?UTF-8?q?=E7=AE=97=E8=80=83=E8=99=91=E6=8D=A2=E8=A1=8C=E7=AC=A6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
modules/web/src/components/ChapterContent.vue | 3 +--
modules/web/src/views/BookChapter.vue | 9 +++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules/web/src/components/ChapterContent.vue b/modules/web/src/components/ChapterContent.vue
index 05473dc6d..0cc720106 100644
--- a/modules/web/src/components/ChapterContent.vue
+++ b/modules/web/src/components/ChapterContent.vue
@@ -41,9 +41,8 @@ const calculateWordCount = (paragraph) => {
const imgPattern = /
]*src="[^"]*(?:"[^>]+\})?"[^>]*>/g;
//内嵌图片文字为1
const imagePlaceHolder = " ";
- return paragraph.trim().replaceAll(imgPattern, imagePlaceHolder).length;
+ return paragraph.replaceAll(imgPattern, imagePlaceHolder).length;
};
-