Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3371)

Unified Diff: sdk/lib/_internal/dartdoc/lib/dartdoc.dart

Issue 12045076: Second half of HTML json docs. This reads the json file and inserts the docs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes. Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/dom/docs/lib/docs.dart » ('j') | tools/dom/scripts/generator.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | tools/dom/docs/lib/docs.dart » ('j') | tools/dom/scripts/generator.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698