mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
fix: 章节内容存在多张图片和文本时,web服务书架中读书无法正确渲染图片(兼容版) (#5126)
* fix: 章节内容存在多张图片和文本时,web服务书架中读书无法正确渲染图片 * fix: 章节内容存在多张图片和文本时,web服务书架中读书无法正确渲染图片(兼容版) * fix: 修改String.prototype.replaceAll为String.prototype.replace --------- Co-authored-by: 17683954109@163.com <17683954109@163.com>
This commit is contained in:
@@ -59,7 +59,7 @@ const calculateWordCount = (paragraph: string) => {
|
||||
const imgPattern = /<img[^>]*src="[^"]*(?:"[^>]+\})?"[^>]*>/g
|
||||
//内嵌图片文字为1
|
||||
const imagePlaceHolder = ' '
|
||||
return paragraph.replaceAll(imgPattern, imagePlaceHolder).length
|
||||
return paragraph.replace(imgPattern, imagePlaceHolder).length
|
||||
}
|
||||
const chapterPos = computed(() => {
|
||||
let pos = -1
|
||||
|
||||
Reference in New Issue
Block a user