mirror of
https://github.com/rust-unofficial/awesome-rust
synced 2024-11-15 16:37:57 +00:00
Also pick up image tags
This commit is contained in:
parent
fd843a5dd8
commit
a6b79d73ec
1 changed files with 12 additions and 9 deletions
21
src/main.rs
21
src/main.rs
|
@ -128,16 +128,19 @@ async fn main() -> Result<()> {
|
|||
|
||||
for (event, _range) in parser.into_offset_iter() {
|
||||
if let Event::Start(tag) = event {
|
||||
if let Tag::Link(_link_type, url, _title) = tag {
|
||||
if !url.starts_with("http") {
|
||||
continue;
|
||||
match tag {
|
||||
Tag::Link(_link_type, url, _title) | Tag::Image(_link_type, url, _title) => {
|
||||
if !url.starts_with("http") {
|
||||
continue;
|
||||
}
|
||||
let url_string = url.to_string();
|
||||
if results.working.contains(&url_string) {
|
||||
continue;
|
||||
}
|
||||
let check = get_url(url_string).boxed();
|
||||
url_checks.push(check);
|
||||
}
|
||||
let url_string = url.to_string();
|
||||
if results.working.contains(&url_string) {
|
||||
continue;
|
||||
}
|
||||
let check = get_url(url_string).boxed();
|
||||
url_checks.push(check);
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue