Skip to content

Commit

Permalink
Rollup merge of rust-lang#43632 - ruuda:allow-long-relative-urls, r=M…
Browse files Browse the repository at this point in the history
…ark-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 `../`.
  • Loading branch information
GuillaumeGomez authored Aug 11, 2017
2 parents 7a80cf1 + 608863d commit 6432313
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/tidy/src/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ fn line_is_url(line: &str) -> bool {
=> 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,
Expand Down

0 comments on commit 6432313

Please sign in to comment.