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

    I-poor-formattingIssue: poor formattingonly-with-optionRequires a non-default option value to reproduce

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions