Skip to content

Commit 0749d0e

Browse files
clarify docCommentValue's docComment
Signed-off-by: Karan <[email protected]>
1 parent 65b02a9 commit 0749d0e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Sources/SwiftSyntax/Trivia+commentValue.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
extension Trivia {
14-
/// The contents of the last doc comment piece with any comment markers removed and indentation whitespace stripped.
14+
/// The normalized contents of the documentation comment in this trivia.
15+
///
16+
/// Returns the content of the last documentation comment block, which semantically represents
17+
/// "the one and only" documentation comment associated with this trivia. Comment markers are
18+
/// removed, common indentation is stripped, and line endings are normalized to `\n`.
19+
///
20+
/// Returns `nil` if no documentation comment is present.
1521
public var docCommentValue: String? {
1622
var comments: [Substring] = []
1723
var currentLineComments: [String] = [] // Reset line comments when encountering a block comment

0 commit comments

Comments
 (0)