NewEpidode: Use parse rss.description instead of itunes.summary.
We can deal with(sort of) html now, so we should start indexing the proper rss description. Also cleanup commented out code.
This commit is contained in:
@@ -327,44 +327,4 @@ mod tests {
|
||||
let id = 000000000;
|
||||
assert!(lookup_id(id).is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_markup() {
|
||||
let markup = html_to_pango_markup;
|
||||
let m = markup("this is parsed");
|
||||
assert_eq!(&m, "this is parsed");
|
||||
|
||||
let m = markup("this is <span>parsed</span>");
|
||||
assert_eq!(&m, "this is <span>parsed</span>");
|
||||
|
||||
let m = markup("this is &ssdf;");
|
||||
assert_eq!(&m, "this is &ssdf;");
|
||||
|
||||
let url = "http://url.com/test?param1¶m2=test¶m3#hashing";
|
||||
let m = markup(&format!("this is &ssdf; {}", url));
|
||||
assert_eq!(
|
||||
&m,
|
||||
&format!(
|
||||
"this is &ssdf; <a href=\"{0}\">{0}</a>",
|
||||
url.replace('&', "&")
|
||||
)
|
||||
);
|
||||
|
||||
for l in &[
|
||||
("with links: http://gnome.org :D", "http://gnome.org"),
|
||||
(
|
||||
"with links: http://url.com/test.html&stuff :D",
|
||||
"http://url.com/test.html&stuff",
|
||||
),
|
||||
] {
|
||||
let m = markup(l.0);
|
||||
assert_eq!(
|
||||
&m,
|
||||
&format!(
|
||||
"with links: <a href=\"{0}\">{0}</a> :D",
|
||||
l.1.replace('&', "&")
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user