Skip to content

wrap_comments breaks links with long URL #3787

@AlephAlpha

Description

@AlephAlpha

With wrap_comments = true, the following code:

//! * [This is a link with a very loooooooooooooooooooooooooooooooooooooooooong URL.](https://example.com/This/is/a/link/with/a/very/loooooooooooooooooooooooooooooooooooooooooong/URL)
fn main() {
    println!("Hello, world!");
}

will be formatted as:

//! 
//! * [This is a link with a very loooooooooooooooooooooooooooooooooooooooooong
//!   URL.](https://example.com/This/is/a/link/with/a/very/
//!   loooooooooooooooooooooooooooooooooooooooooong/URL)
fn main() {
    println!("Hello, world!");
}

The URL is broken into two lines.

It seems that this only happens in lists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions