Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blazor razor formatting bug #9167

Closed
1 task done
gavranovic672 opened this issue Aug 24, 2023 · 3 comments
Closed
1 task done

Blazor razor formatting bug #9167

gavranovic672 opened this issue Aug 24, 2023 · 3 comments

Comments

@gavranovic672
Copy link

gavranovic672 commented Aug 24, 2023

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

After visual studio 2019, formatting of razor files is awful. Indent of the tags is broken.
I installed the new version: 17.7.2 and it seems someone did do something to fix it but it is still broken.

Before update:

<VsoNumeric Name="@nameof(DataContext.Model.ReminderTolerance)"
        Label="@T("VSO.ReminderStageSetting.Field.ReminderTolerance")"
        @bind-Value="@DataContext.Model.ReminderTolerance"
            class="vso-edit"
        Disabled="!DataContext.HasEditPermission" />

After update

<VsoNumeric Name="@nameof(DataContext.Model.ReminderTolerance)"
            Label="@T("VSO.ReminderStageSetting.Field.ReminderTolerance")"
@bind-Value="@DataContext.Model.ReminderTolerance"
            class="vso-edit"
            Disabled="!DataContext.HasEditPermission" />

Expected Behavior

I want that the ident is aligned, like before:

                    <VsoNumeric Name="@nameof(DataContext.Model.ReminderTolerance)"
                                Label="@T("VSO.ReminderStageSetting.Field.ReminderTolerance")"
                                @bind-Value="@DataContext.Model.ReminderTolerance"
                                class="vso-edit"
                                Disabled="!DataContext.HasEditPermission" />

Steps To Reproduce

Create a blazor app, create a view, add some @IF-s or/and @foreach, add a few elements, then hit ctrl + k + d (format.

Exceptions (if any)

No response

.NET Version

.net 7.0

Anything else?

No response

@javiercn javiercn transferred this issue from dotnet/aspnetcore Aug 25, 2023
@ghost ghost added the untriaged label Aug 25, 2023
@davidwengier
Copy link
Contributor

davidwengier commented Aug 25, 2023

@SteveSandersonMS did you mean to comment on this issue? This seems like a formatting issue, possibly a duplicate of #8606, but you are commenting about runtime sounding things?

@SteveSandersonMS
Copy link
Member

@davidwengier Ah, sorry! Too many tabs opened. I've deleted that comment and reposted it where it was meant to go on dotnet/aspnetcore#50198.

@davidwengier
Copy link
Contributor

Thanks for the report @gavranovic672 but I'm going to close this as a duplicate of #8606. I'm also putting up a fix for it though :)

@davidwengier davidwengier closed this as not planned Won't fix, can't repro, duplicate, stale Aug 25, 2023
@ghost ghost removed the untriaged label Aug 25, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants