Merge remote-tracking branch 'origin/master'

pull/1238/head
gedoor 3 years ago
commit c45910358e
  1. 5
      epublib/src/main/java/me/ag2s/epublib/util/StringUtil.java

@ -280,8 +280,9 @@ public class StringUtil {
s = s.replaceAll("^\\s+|\\s+$", ""); s = s.replaceAll("^\\s+|\\s+$", "");
if (s.length() > 0) { if (s.length() > 0) {
if (s.toLowerCase().contains("<img")) { if (s.toLowerCase().contains("<img")) {
body.append(s.replaceAll("(?i)<img\\s([^>]+)/?>", "<div class=\"duokan-image-single\"><img class=\"picture-80\" $1/></div>")); s = s.replaceAll("(?i)<img\\s([^>]+)/?>", "<div class=\"duokan-image-single\"><img class=\"picture-80\" $1/></div>");
} else { }
if (!(s.startsWith("<div") && s.endsWith("</div>"))) {
body.append("<p>").append(s).append("</p>"); body.append("<p>").append(s).append("</p>");
} }
} }

Loading…
Cancel
Save