зеркало из https://github.com/dotnet/razor.git
Move HtmlFormattingPass down
This commit is contained in:
Родитель
38868db9c2
Коммит
ca142becdc
|
@ -8,13 +8,12 @@ using System.Threading.Tasks;
|
|||
using Microsoft.AspNetCore.Razor.Language;
|
||||
using Microsoft.AspNetCore.Razor.Language.Syntax;
|
||||
using Microsoft.CodeAnalysis.Razor.DocumentMapping;
|
||||
using Microsoft.CodeAnalysis.Razor.Formatting;
|
||||
using Microsoft.CodeAnalysis.Razor.Logging;
|
||||
using Microsoft.CodeAnalysis.Razor.Protocol;
|
||||
using Microsoft.CodeAnalysis.Text;
|
||||
using Microsoft.VisualStudio.LanguageServer.Protocol;
|
||||
|
||||
namespace Microsoft.AspNetCore.Razor.LanguageServer.Formatting;
|
||||
namespace Microsoft.CodeAnalysis.Razor.Formatting;
|
||||
|
||||
internal sealed class HtmlFormattingPass(
|
||||
IDocumentMappingService documentMappingService,
|
|
@ -32,7 +32,7 @@ internal class RazorFormattingService(
|
|||
FormattingOptions options,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
Debug.Assert(_formattingPasses[0].GetType().Name == "HtmlFormattingPass", "Formatting requires the first pass to be Html");
|
||||
Debug.Assert(_formattingPasses[0] is HtmlFormattingPass, "Formatting requires the first pass to be Html");
|
||||
|
||||
var codeDocument = await documentContext.Snapshot.GetFormatterCodeDocumentAsync().ConfigureAwait(false);
|
||||
|
||||
|
@ -130,7 +130,7 @@ internal class RazorFormattingService(
|
|||
bool automaticallyAddUsings,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
Debug.Assert(_formattingPasses[0].GetType().Name == "HtmlFormattingPass", "Formatting requires the first pass to be Html");
|
||||
Debug.Assert(_formattingPasses[0] is HtmlFormattingPass, "Formatting requires the first pass to be Html");
|
||||
|
||||
// If we only received a single edit, let's always return a single edit back.
|
||||
// Otherwise, merge only if explicitly asked.
|
||||
|
|
Загрузка…
Ссылка в новой задаче