Skip to content

Commit 0d9c98f

Browse files
committed
add tel detection
1 parent d2e7b1d commit 0d9c98f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lychee-lib/src/client.rs

+1
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,7 @@ impl Client {
500500
let status = match uri.scheme() {
501501
_ if uri.is_file() => self.check_file(uri).await,
502502
_ if uri.is_mail() => self.check_mail(uri).await,
503+
_ if uri.is_tel() => Status::Excluded,
503504
_ => self.check_website(uri, default_chain).await?,
504505
};
505506

lychee-lib/src/types/uri/valid.rs

+7
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@ impl Uri {
9696
self.scheme() == "mailto"
9797
}
9898

99+
#[inline]
100+
#[must_use]
101+
/// Check if the URI is a tel
102+
pub fn is_tel(&self) -> bool {
103+
self.scheme() == "tel"
104+
}
105+
99106
#[inline]
100107
#[must_use]
101108
/// Check if the URI is a file

0 commit comments

Comments
 (0)