From 471e9110f5eac178ff7d19d28353023ea5a7d0c5 Mon Sep 17 00:00:00 2001 From: topecongiro Date: Wed, 1 Nov 2017 12:35:32 +0900 Subject: [PATCH] Add ftp and file protocols --- src/comment.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/comment.rs b/src/comment.rs index 0e06545300a4..8fad0e01b7a9 100644 --- a/src/comment.rs +++ b/src/comment.rs @@ -396,7 +396,7 @@ fn rewrite_comment_inner( /// Returns true if the given string MAY include URLs or alike. fn has_url(s: &str) -> bool { // This function may return false positive, but should get its job done in most cases. - s.contains("https://") || s.contains("http://") + s.contains("https://") || s.contains("http://") || s.contains("ftp://") || s.contains("file://") } /// Given the span, rewrite the missing comment inside it if available.