diff --git a/lychee-bin/src/formatters/stats/markdown.rs b/lychee-bin/src/formatters/stats/markdown.rs index dba76222e8..df7f2c19d2 100644 --- a/lychee-bin/src/formatters/stats/markdown.rs +++ b/lychee-bin/src/formatters/stats/markdown.rs @@ -67,10 +67,9 @@ fn stats_table(stats: &ResponseStats) -> String { /// Optional details get added if available. fn markdown_response(response: &ResponseBody) -> Result { let mut formatted = format!( - "* [{}] [{}]({})", + "* [{}] <{}>", response.status.code_as_string(), response.uri, - response.uri, ); if let Status::Ok(StatusCode::OK) = response.status { @@ -171,10 +170,7 @@ mod tests { status: Status::Ok(StatusCode::OK), }; let markdown = markdown_response(&response).unwrap(); - assert_eq!( - markdown, - "* [200] [http://example.com/](http://example.com/)" - ); + assert_eq!(markdown, "* [200] "); } #[test] @@ -184,10 +180,7 @@ mod tests { status: Status::Cached(CacheStatus::Ok(200)), }; let markdown = markdown_response(&response).unwrap(); - assert_eq!( - markdown, - "* [200] [http://example.com/](http://example.com/) | OK (cached)" - ); + assert_eq!(markdown, "* [200] | OK (cached)"); } #[test] @@ -197,10 +190,7 @@ mod tests { status: Status::Cached(CacheStatus::Error(Some(400))), }; let markdown = markdown_response(&response).unwrap(); - assert_eq!( - markdown, - "* [400] [http://example.com/](http://example.com/) | Error (cached)" - ); + assert_eq!(markdown, "* [400] | Error (cached)"); } #[test] @@ -253,7 +243,7 @@ mod tests { ### Errors in stdin -* [404] [http://127.0.0.1/](http://127.0.0.1/) | Error (cached) +* [404] | Error (cached) ## Suggestions per input