]> git.lizzy.rs Git - rust.git/commitdiff
Detect relative urls in tidy check
authorRuud van Asseldonk <dev@veniogames.com>
Thu, 3 Aug 2017 19:13:27 +0000 (21:13 +0200)
committerRuud van Asseldonk <dev@veniogames.com>
Thu, 3 Aug 2017 19:13:27 +0000 (21:13 +0200)
src/tools/tidy/src/style.rs

index b42beb37821cef09e09f52073161ad62b2cd0eda..d0483e64b4030d953d95dc0e07905d1fea704ea3 100644 (file)
@@ -79,11 +79,11 @@ fn line_is_url(line: &str) -> bool {
                 => state = EXP_URL,
 
             (EXP_LINK_LABEL_OR_URL, w)
-                if w.starts_with("http://") || w.starts_with("https://")
+                if w.starts_with("http://") || w.starts_with("https://") || w.starts_with("../")
                 => state = EXP_END,
 
             (EXP_URL, w)
-                if w.starts_with("http://") || w.starts_with("https://")
+                if w.starts_with("http://") || w.starts_with("https://") || w.starts_with("../")
                 => state = EXP_END,
 
             (_, _) => return false,