|
|
|
@ -279,10 +279,10 @@ public class StringUtil { |
|
|
|
|
for (String s : text.split("\\r?\\n")) { |
|
|
|
|
s = s.replaceAll("^\\s+|\\s+$", ""); |
|
|
|
|
if (s.length() > 0) { |
|
|
|
|
if (s.toLowerCase().contains("<img")) { |
|
|
|
|
s = s.replaceAll("(?i)<img\\s([^>]+)/?>", "<div class=\"duokan-image-single\"><img class=\"picture-80\" $1/></div>"); |
|
|
|
|
} |
|
|
|
|
if (!(s.startsWith("<div") && s.endsWith("</div>"))) { |
|
|
|
|
//段落为一张图片才认定为图片章节/漫画并启用多看单图优化,否则认定为普通文字夹杂着的图片文字。
|
|
|
|
|
if (s.matches("(?i)^<img\\s([^>]+)/?>$")) { |
|
|
|
|
body.append(s.replaceAll("(?i)^<img\\s([^>]+)/?>$", "<div class=\"duokan-image-single\"><img class=\"picture-80\" $1/></div>")); } |
|
|
|
|
else{ |
|
|
|
|
body.append("<p>").append(s).append("</p>"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|