say when there is no text in a footprint
This commit is contained in:
parent
8e9192ce98
commit
b1e3218eb3
@ -42,10 +42,17 @@ const ISO8601_DATE: u128 = iso8601::Config::DEFAULT
|
||||
|
||||
impl Footprint {
|
||||
pub fn into_rss_item(self, root_url: &str) -> Item {
|
||||
let text = if String::is_empty(&self.text) {
|
||||
"No description"
|
||||
} else {
|
||||
&self.text
|
||||
};
|
||||
// injection, I know
|
||||
let desc = format!(
|
||||
"{} <br /><br /> --- <br /><br /> from {}",
|
||||
self.text,
|
||||
page_url(root_url, self.page)
|
||||
"{} <br /><br /> --- <br /><br /> from <a href=\"{}\">page {}</a>",
|
||||
text,
|
||||
page_url(root_url, self.page),
|
||||
self.page
|
||||
);
|
||||
ItemBuilder::default()
|
||||
.title(Some(self.title))
|
||||
|
Loading…
Reference in New Issue
Block a user