Skip to content

Commit 1ad2f3e

Browse files
committed
Change regex to <br/?>
1 parent e65c453 commit 1ad2f3e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/kotlin/lau/NovelDL/NovelHandler.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import java.lang.NullPointerException
1111
fun readNovel(plain: String): String {
1212
// Get the main part of the novel
1313
val novelStart: Int = plain.indexOf("<divid=\"content\"")
14-
if (novelStart == -1) throw NullPointerException("Not novel");
14+
if (novelStart == -1) throw NullPointerException("Not novel")
1515
var novel: String = plain.substring(
1616
plain.indexOf('>', novelStart) + 1,
1717
plain.indexOf("</div>", novelStart)
@@ -24,7 +24,7 @@ fun readNovel(plain: String): String {
2424
novel = Regex("&quot;").replace(novel, "\"")
2525

2626
// Process "</br>"s
27-
novel = Regex("<br/>").replace(novel, "\n")
27+
novel = Regex("<br/?>").replace(novel, "\n")
2828

2929
// Remove "<a href=url></a>"s
3030
novel = removePartsFromString(novel, "<ahref", "</a>", "")

0 commit comments

Comments
 (0)