Remove Url::scheme check in markdown::parse_with

This commit is contained in:
Günther Jena 2025-06-16 15:38:15 +02:00 committed by Héctor Ramón Jiménez
parent 6e894355d4
commit a9c1b81b58
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -603,16 +603,7 @@ fn parse_with<'a>(
None
}
pulldown_cmark::Tag::Link { dest_url, .. } if !metadata => {
match Url::parse(&dest_url) {
Ok(url)
if url.scheme() == "http"
|| url.scheme() == "https" =>
{
link = Some(url);
}
_ => {}
}
link = Url::parse(&dest_url).ok();
None
}
pulldown_cmark::Tag::Image {