diff --git a/src/helpers/GenerateDocs/Program.cs b/src/helpers/GenerateDocs/Program.cs index 93ed803..f0a2265 100644 --- a/src/helpers/GenerateDocs/Program.cs +++ b/src/helpers/GenerateDocs/Program.cs @@ -19,7 +19,15 @@ 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)); + code = string.Join('\n', lines + .Where(x => !x.Contains(".Should()")) + .Select(x => x.Length > 8 ? x[8..] : string.Empty)); + + code = code + .Replace( + "using var api = GetAuthorizedApi();", + "using var api = new AnthropicApi(apiKey);") + ; var newPath = Path.Combine(newDir, $"{Path.GetExtension(Path.GetFileNameWithoutExtension(path)).TrimStart('.')}.md"); await File.WriteAllTextAsync(newPath, $@"```csharp