Skip to content

How to disable formatting for comments? #4787

Closed
@hirrolot

Description

@hirrolot

I have an MD table like this:

| Feature | Description |
|----------|----------|
| blah | some long long long long long long long long line |

I also have wrap_comments = true in my rustfmt.toml. As a result, rustfmt breaks the long line and disfigures the table. The comment itself is located at the top level of a .rs file and must be treated as a public documentation.

Can I tell rustfmt to skip this table?

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