From e65219a2d7b4e3f7a5b8669145f2d746f19e9d1d Mon Sep 17 00:00:00 2001 From: celetor <86599970+celetor@users.noreply.github.com> Date: Mon, 26 Jul 2021 08:40:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Depub=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epublib/src/main/java/me/ag2s/epublib/util/StringUtil.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/epublib/src/main/java/me/ag2s/epublib/util/StringUtil.java b/epublib/src/main/java/me/ag2s/epublib/util/StringUtil.java index f3c0a6058..35f3fcd2b 100644 --- a/epublib/src/main/java/me/ag2s/epublib/util/StringUtil.java +++ b/epublib/src/main/java/me/ag2s/epublib/util/StringUtil.java @@ -280,8 +280,9 @@ public class StringUtil { s = s.replaceAll("^\\s+|\\s+$", ""); if (s.length() > 0) { if (s.toLowerCase().contains("]+)/?>", "
")); - } else { + s = s.replaceAll("(?i)]+)/?>", "
"); + } + if (!(s.startsWith(""))) { body.append("

").append(s).append("

"); } }