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

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

Issue 11598013: Fixed library documentation. (Closed) Base URL: https://git.chromium.org/git/external/dart/bleeding_edge.git@master
Patch Set: Removed leading dart/ Created 8 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/dartdoc/lib/src/dartdoc/comment_map.dart
diff --git a/sdk/lib/_internal/dartdoc/lib/src/dartdoc/comment_map.dart b/sdk/lib/_internal/dartdoc/lib/src/dartdoc/comment_map.dart
index 14f17bd4bb5abbeece49a899262146142a899903..7c8bd59ae295269b9bdddc463ae77a6ed281d78a 100644
--- a/sdk/lib/_internal/dartdoc/lib/src/dartdoc/comment_map.dart
+++ b/sdk/lib/_internal/dartdoc/lib/src/dartdoc/comment_map.dart
@@ -81,13 +81,10 @@ class CommentMap {
lastComment = '$lastComment\n$line';
}
}
- } else if (token.kind == dart2js.HASH_TOKEN) {
+ } else if (token.stringValue == 'library' && lastComment != null) {
// Look for `library` to find the library comment.
- final next = token.next;
- if ((lastComment != null) && (next.stringValue == 'library')) {
- _libraryComments[source.sourceUri.toString()] = lastComment;
- lastComment = null;
- }
+ _libraryComments[source.sourceUri.toString()] = lastComment;
+ lastComment = null;
} else if (lastComment != null) {
if (!lastComment.trim().isEmpty) {
// We haven't attached the last doc comment to something yet, so stick
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698