Skip to content

Suspicious formatting with string literals in macros #5855

@JaniM

Description

@JaniM

This isn't exactly a bug, but I feel the behavior is highly unexpected.

let _style = css!("
    display: flex;
    flex-direction: column;
    ...
");

formats to

let _style = css!(
    "
    display: flex;
    flex-direction: column;
    ...
"
);

I much prefer the original code.
Playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=2e601d5bbc9f0103bf217f469c6dc0a1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions