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 3a7c30311a76e4333567ab10abb0a11830322670..0e8ea5e576bc1a3cea426f60f9eaca65ec20f73a 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; |