Skip to content

Commit 3ecaf79

Browse files
committed
Fix executive order original summary formatting
1 parent 0ca4c60 commit 3ecaf79

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/src/main/java/com/kylecorry/preparedness_feed/infrastructure/alerts/ExecutiveOrderAlertSource.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ class ExecutiveOrderAlertSource(context: Context) : RssAlertSource(context) {
3838
return alert.copy(summary = "", shouldSummarize = false, level = AlertLevel.Noise)
3939
}
4040

41-
val content = html.select(".entry-content > p").text()
41+
val content = Jsoup.parse(html.select(".entry-content > p").html()).wholeText()
42+
.replace(" ", "").split("\n").filter { it.trim().isNotBlank() }
43+
.joinToString("\n\n") { it.trim() }
4244
return alert.copy(summary = content)
4345
}
4446
}

0 commit comments

Comments
 (0)