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

Side by Side Diff: pkg/analyzer/lib/src/codegen/text_formatter.dart

Issue 1411153007: Begin moving code generation tools from analysis_server to analyzer. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « pkg/analyzer/lib/src/codegen/html.dart ('k') | pkg/analyzer/lib/src/codegen/tools.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 /** 5 /**
6 * Code for converting HTML into text, for use in doc comments. 6 * Code for converting HTML into text, for use during code generation of
7 * analyzer and analysis server.
7 */ 8 */
8 library text.formatter; 9 library analyzer.src.codegen.text_formatter;
9 10
10 import 'package:html/dom.dart' as dom; 11 import 'package:html/dom.dart' as dom;
11 12
12 import 'codegen_tools.dart'; 13 import 'tools.dart';
13 14
14 final RegExp whitespace = new RegExp(r'\s'); 15 final RegExp whitespace = new RegExp(r'\s');
15 16
16 /** 17 /**
17 * Convert the HTML in [desc] into text, word wrapping at width [width]. 18 * Convert the HTML in [desc] into text, word wrapping at width [width].
18 * 19 *
19 * If [javadocStyle] is true, then the output is compatable with Javadoc, 20 * If [javadocStyle] is true, then the output is compatable with Javadoc,
20 * which understands certain HTML constructs. 21 * which understands certain HTML constructs.
21 */ 22 */
22 String nodesToText(List<dom.Node> desc, int width, bool javadocStyle, 23 String nodesToText(List<dom.Node> desc, int width, bool javadocStyle,
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 writeln(line); 238 writeln(line);
238 line = word; 239 line = word;
239 } 240 }
240 } else { 241 } else {
241 line = word; 242 line = word;
242 } 243 }
243 word = ''; 244 word = '';
244 } 245 }
245 } 246 }
246 } 247 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/codegen/html.dart ('k') | pkg/analyzer/lib/src/codegen/tools.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698