From ae867ab3e5a2d19ec3f2d36e863115863ef4ce64 Mon Sep 17 00:00:00 2001 From: Dustin Campbell Date: Fri, 11 Oct 2024 14:29:47 -0700 Subject: [PATCH] Now that GetTextAsync is cancellable, remove throw on cancel requested --- .../Formatting/Passes/CSharpOnTypeFormattingPass.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Formatting/Passes/CSharpOnTypeFormattingPass.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Formatting/Passes/CSharpOnTypeFormattingPass.cs index a64523ee2d..58ba8c123b 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Formatting/Passes/CSharpOnTypeFormattingPass.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Formatting/Passes/CSharpOnTypeFormattingPass.cs @@ -121,8 +121,6 @@ internal sealed class CSharpOnTypeFormattingPass( changedContext = await changedContext.WithTextAsync(cleanedText, cancellationToken).ConfigureAwait(false); - cancellationToken.ThrowIfCancellationRequested(); - // At this point we should have applied all edits that adds/removes newlines. // Let's now ensure the indentation of each of those lines is correct.