             let content = contents[i]
             
             // 章节分类.
-            if (content.contains("Chapter") || content.contains("章")) {
-                print("")
+            let contentTrim = content.trimmingCharacters(in: CharacterSet.whitespaces)
+            if (contentTrim.contains("Chapter") || (contentTrim.contains("第") && contentTrim.contains("章"))) {
+                self.addToPageContents(contentValue: contentValue)
+                contentValue = ""
             }
             
             if (i > 0 && i % count == 0) {

        let array = content.components(separatedBy: .newlines)
        
        var contents = [String]()
        for lineStr in array {
            if (lineStr.characters.count <= letersPerLine) {
                contents.append(lineStr)

            }
        }
        
//        for lineStr in array {
//            if (lineStr.characters.count <= letersPerLine) {
//                contents.append(lineStr)
//            } else {
//                var temp = lineStr
//                while temp.characters.count > letersPerLine {
//                    let subText = (temp as NSString).substring(to: letersPerLine)
//                    contents.append(subText)
//                    temp = (temp as NSString).substring(from: letersPerLine)
//                }
//                
//                if (temp != "") {
//                    contents.append(temp)
//                }
//            }
//        }
        
        let count = contents.count > Int(lines) ? Int(lines) : contents.count
        
        var contentValue = ""
