Index: sdk/lib/_internal/dartdoc/lib/dartdoc.dart |
diff --git a/sdk/lib/_internal/dartdoc/lib/dartdoc.dart b/sdk/lib/_internal/dartdoc/lib/dartdoc.dart |
index 7bb466d3ef0ca51954b4d0b448fe4aad0ad95046..657670180fb303bf6f3ab0d7c1a9222b4bb39e8c 100644 |
--- a/sdk/lib/_internal/dartdoc/lib/dartdoc.dart |
+++ b/sdk/lib/_internal/dartdoc/lib/dartdoc.dart |
@@ -1861,7 +1861,7 @@ class InternalError { |
/** |
* Computes the doc comment for the declaration mirror. |
-* |
+ * |
* Multiple comments are concatenated with newlines in between. |
*/ |
String computeComment(DeclarationMirror mirror) { |
@@ -1881,6 +1881,22 @@ String computeComment(DeclarationMirror mirror) { |
return text; |
} |
+/** |
+ * Computes the doc comment for the declaration mirror as a list. |
+ */ |
+List<String> computeUntrimmedCommentAsList(DeclarationMirror mirror) { |
+ var text = <String>[]; |
+ for (InstanceMirror metadata in mirror.metadata) { |
+ if (metadata is CommentInstanceMirror) { |
+ CommentInstanceMirror comment = metadata; |
+ if (comment.isDocComment) { |
+ text.add(comment.text); |
+ } |
+ } |
+ } |
+ return text; |
+} |
+ |
class DocComment { |
final String text; |