Skip to content

multi-line raw string in linq query causes a subsequent linq query to be printed on one line #1617

@Meowtimer

Description

@Meowtimer

Input:

var patterns = (
			from e in con.Elements()
			select """
            asd
            """
		).Pipe(pats => from p in pats where superLongCondition select ConstructSomethingElseUsingALongAndBoringMethod(p)).ToArray();

Output:

var patterns = (
    from e in con.Elements()
    select """
        asd
        """
).Pipe(pats => from p in pats where superLongCondition select ConstructSomethingElseUsingALongAndBoringMethod(p)).ToArray();

Expected behavior:
The output with a non-multiline raw string is

var patterns = (from e in con.Elements() select """asd""")
    .Pipe(pats =>
        from p in pats
        where superLongCondition
        select ConstructSomethingElseUsingALongAndBoringMethod(p)
    )
    .ToArray();

and I would expect the second linq query to be formatted similarly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions