Skip to content
This repository has been archived by the owner on Sep 6, 2024. It is now read-only.

Commit

Permalink
[*] refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
heng30 committed Dec 5, 2023
1 parent f66b88e commit 48281d1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions rssbox/src/logic/rss.rs
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,14 @@ async fn fetch_entry(config: SyncItem) -> Result<Vec<RssEntry>, Box<dyn std::err

let summary = if item.description().is_some() {
let s = item.description().unwrap();
html2text::from_read(s.as_bytes(), usize::MAX)
let s = html2text::from_read(s.as_bytes(), usize::MAX)
.trim()
.to_string()
.to_string();
if s.len() > 200 {
format!("{}...", &s[..200])
} else {
s
}
} else {
"".to_string()
};
Expand Down

0 comments on commit 48281d1

Please sign in to comment.