From b2feaa445b4d73b848a51c4ea2fd881fb1faf549 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 19 Aug 2024 05:19:47 +0000 Subject: [PATCH] style: Run dotnet format --- src/Helpers/GenerateDocs/Program.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Helpers/GenerateDocs/Program.cs b/src/Helpers/GenerateDocs/Program.cs index 66ffe4b5..7ed70c7c 100644 --- a/src/Helpers/GenerateDocs/Program.cs +++ b/src/Helpers/GenerateDocs/Program.cs @@ -25,14 +25,14 @@ await File.WriteAllTextAsync(newPath, $@"```csharp var newDir = Path.Combine(solutionDirectory, "docs", "samples"); Directory.CreateDirectory(newDir); - + var start = code.IndexOf("\n {", StringComparison.Ordinal); var end = code.IndexOf("\n }", StringComparison.Ordinal); code = code.Substring(start + 4, end - start + 4); - + var lines = code.Split('\n')[1..^2]; code = string.Join('\n', lines.Select(x => x.Length > 8 ? x[8..] : string.Empty)); - + var newPath = Path.Combine(newDir, $"{Path.GetExtension(Path.GetFileNameWithoutExtension(path)).TrimStart('.')}.md"); await File.WriteAllTextAsync(newPath, $@"```csharp {code}