|
|
@ -111,10 +111,10 @@ object ChapterProvider { |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
content.replace(AppPattern.imgPattern.toRegex(), "\n\b\$0\n") |
|
|
|
content.replace(AppPattern.imgPattern.toRegex(), "\n\$0\n") |
|
|
|
.split("\n").forEach { text -> |
|
|
|
.split("\n").forEach { text -> |
|
|
|
if (text.isNotBlank()) { |
|
|
|
if (text.isNotBlank()) { |
|
|
|
if(text[0] != '\b'){ //非图片 |
|
|
|
if(!text.startsWith("<img src=\"")){ //非图片 |
|
|
|
val isTitle = index == 0 |
|
|
|
val isTitle = index == 0 |
|
|
|
val textPaint = if (isTitle) titlePaint else contentPaint |
|
|
|
val textPaint = if (isTitle) titlePaint else contentPaint |
|
|
|
if (!(isTitle && ReadBookConfig.titleMode == 2)) { |
|
|
|
if (!(isTitle && ReadBookConfig.titleMode == 2)) { |
|
|
@ -125,7 +125,7 @@ object ChapterProvider { |
|
|
|
} |
|
|
|
} |
|
|
|
} else { //图片 |
|
|
|
} else { //图片 |
|
|
|
durY = setTypeImage( |
|
|
|
durY = setTypeImage( |
|
|
|
book, bookChapter, text.substring(1), |
|
|
|
book, bookChapter, text, |
|
|
|
durY, textPages, book.getImageStyle() |
|
|
|
durY, textPages, book.getImageStyle() |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|