diff --git a/ApiDoctor.Validation/DocFile.cs b/ApiDoctor.Validation/DocFile.cs index d89e2bc9..d479b301 100644 --- a/ApiDoctor.Validation/DocFile.cs +++ b/ApiDoctor.Validation/DocFile.cs @@ -581,7 +581,8 @@ protected bool ParseMarkdownBlocks(IssueLogger issues) else if (previousHeaderBlock.BlockType == BlockType.h1) { methodDescriptionsData.Add(block.Content); - methodDescription = string.Join(" ", methodDescriptionsData.SkipWhile(x => x.StartsWith("Namespace:"))).ToStringClean(); + // make sure we omit the namespace description as well as the national cloud deployments paragraphs + methodDescription = string.Join(" ", methodDescriptionsData.Where(static x => !x.StartsWith("Namespace:",StringComparison.OrdinalIgnoreCase) && !x.Contains("[national cloud deployments](/graph/deployments)",StringComparison.OrdinalIgnoreCase))).ToStringClean(); issues.Message($"Found description: {methodDescription}"); } }