diff --git a/src/lib.rs b/src/lib.rs index 16c7217..c7bc0da 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -49,6 +49,7 @@ fn process_children(children: &Vec) -> String { result } + fn has_image(children: &Vec) -> bool { let mut result = false; for c in children { @@ -125,6 +126,16 @@ fn get_media_source(children: &Vec) -> Option { fn media_content(item: &Item) -> Content{ match item { + Item::Link(_,children) => { + for c in children { + match c { + Item::Video(_) => {return media_content(c);} + Item::Audio(_) => {return media_content(c);} + _ => {} + } + } + Content::Ignore + } Item::Audio(children) => { match get_media_source(children) { Some(s) => {