Skip to content

Commit 36d143f

Browse files
authored
Rollup merge of rust-lang#43632 - ruuda:allow-long-relative-urls, r=Mark-Simulacrum
Detect relative urls in tidy check This came up in rust-lang#43631: there can be long relative urls in Markdown comments, that do not start with `http://` or `https://`, so the tidy check will not detect them as urls and complain about the line length. This PR adds detection of relative urls starting with `../`.
2 parents 0a70336 + 608863d commit 36d143f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/tidy/src/style.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ fn line_is_url(line: &str) -> bool {
8383
=> state = EXP_END,
8484

8585
(EXP_URL, w)
86-
if w.starts_with("http://") || w.starts_with("https://")
86+
if w.starts_with("http://") || w.starts_with("https://") || w.starts_with("../")
8787
=> state = EXP_END,
8888

8989
(_, _) => return false,

0 commit comments

Comments
 (0)