Skip to content

Commit 471e911

Browse files
committed
Add ftp and file protocols
1 parent dae76d2 commit 471e911

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/comment.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ fn rewrite_comment_inner(
396396
/// Returns true if the given string MAY include URLs or alike.
397397
fn has_url(s: &str) -> bool {
398398
// This function may return false positive, but should get its job done in most cases.
399-
s.contains("https://") || s.contains("http://")
399+
s.contains("https://") || s.contains("http://") || s.contains("ftp://") || s.contains("file://")
400400
}
401401

402402
/// Given the span, rewrite the missing comment inside it if available.

0 commit comments

Comments
 (0)