diff --git a/epublib/src/main/java/me/ag2s/epublib/util/ResourceUtil.java b/epublib/src/main/java/me/ag2s/epublib/util/ResourceUtil.java
index ad8ecab91..faf074333 100644
--- a/epublib/src/main/java/me/ag2s/epublib/util/ResourceUtil.java
+++ b/epublib/src/main/java/me/ag2s/epublib/util/ResourceUtil.java
@@ -36,14 +36,21 @@ public class ResourceUtil {
* @return 返回Resource
*/
public static Resource createChapterResource(String title, String txt, String model, String href) {
- if (title.contains("\n")) {
- title = "" + title.replaceFirst("\\s*\\n\\s*", "
");
- } else {
- title = title.replaceFirst("\\s+", "
");
- if (title.contains(""))
- title = "" + title;
+ //String[] title_list = title.split("\\s+", 2);
+ //String title_part1 = title_list[0];
+ //String title_part2 = "";
+ //if (title_list.length == 2) {
+ // title_part2 = title_list[1];
+ //}
+ String ori_title = title;
+ title = title.replaceFirst("\\s+", "
");
+ if (title.contains("")) {
+ title = "" + title;
}
String html = model.replace("{title}", title)
+ .replace("{ori_title}", ori_title)
+ //.replace("{title_part1}", title_part1)
+ //.replace("{title_part2}", title_part2)
.replace("{content}", StringUtil.formatHtml(txt));
return new Resource(html.getBytes(), href);
}