diff --git a/StyleChecker/StyleChecker.Test/Spacing/NoSingleSpaceAfterTripleSlash/Okay.cs b/StyleChecker/StyleChecker.Test/Spacing/NoSingleSpaceAfterTripleSlash/Okay.cs index 47f398e4..f97318a7 100644 --- a/StyleChecker/StyleChecker.Test/Spacing/NoSingleSpaceAfterTripleSlash/Okay.cs +++ b/StyleChecker/StyleChecker.Test/Spacing/NoSingleSpaceAfterTripleSlash/Okay.cs @@ -73,5 +73,28 @@ private void Tab() private void NoXmlTab() { } + + private void NoDocumentationComment() + { + /// + + /// hello + + /// hello + + /// hello + + /// hello + + /// + + /// hello + + /// hello + + /// hello + + /// hello + } } } diff --git a/StyleChecker/StyleChecker/Spacing/NoSingleSpaceAfterTripleSlash/Analyzer.cs b/StyleChecker/StyleChecker/Spacing/NoSingleSpaceAfterTripleSlash/Analyzer.cs index bbe61a73..f28574c1 100644 --- a/StyleChecker/StyleChecker/Spacing/NoSingleSpaceAfterTripleSlash/Analyzer.cs +++ b/StyleChecker/StyleChecker/Spacing/NoSingleSpaceAfterTripleSlash/Analyzer.cs @@ -100,7 +100,8 @@ static bool DoesTokenHaveGoodSpace(SyntaxToken t) || !IsSldcTrivia(top) || GetNextElement(top, child) is null || IsNextTokenNewLine(child, t) - || text.Length is 1); + || text.Length is 1 + || !text.Skip(1).All(WhitespaceCharSet.Contains)); } static bool DoesTokenStartWithWhiteSpace(SyntaxToken t) @@ -154,7 +155,7 @@ static Func LocationSupplier(SyntaxTree tree) + ... + XmlText | + ... - | + XmlTextLiteralToken (equals " ") + | + XmlTextLiteralToken (starts with " "... and contains non-" ") | + Lead: ... | + Lead: DocumentationCommentExteriorTrivia + ...