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

Side by Side Diff: pkg/analysis_server/lib/src/utilities/documentation.dart

Issue 2894883002: Remove more libraries directives from server (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library analysis_server.src.utilities.documentation;
6
7 String getDartDocSummary(String str) { 5 String getDartDocSummary(String str) {
8 if (str == null) { 6 if (str == null) {
9 return null; 7 return null;
10 } 8 }
11 List<String> lines = str.split('\n'); 9 List<String> lines = str.split('\n');
12 StringBuffer sb = new StringBuffer(); 10 StringBuffer sb = new StringBuffer();
13 bool firstLine = true; 11 bool firstLine = true;
14 for (String line in lines) { 12 for (String line in lines) {
15 if (sb.length != 0 && line.isEmpty) { 13 if (sb.length != 0 && line.isEmpty) {
16 return sb.toString(); 14 return sb.toString();
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 if (!firstLine) { 58 if (!firstLine) {
61 sb.write('\n'); 59 sb.write('\n');
62 } 60 }
63 firstLine = false; 61 firstLine = false;
64 sb.write(line); 62 sb.write(line);
65 } 63 }
66 str = sb.toString(); 64 str = sb.toString();
67 // done 65 // done
68 return str; 66 return str;
69 } 67 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/utilities/average.dart ('k') | pkg/analysis_server/lib/src/watch_manager.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698