OLD | NEW |
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 in doc comments. |
7 */ | 7 */ |
8 library text.formatter; | 8 library text.formatter; |
9 | 9 |
10 import 'package:html5lib/dom.dart' as dom; | 10 import 'package:html/dom.dart' as dom; |
11 | 11 |
12 import 'codegen_tools.dart'; | 12 import 'codegen_tools.dart'; |
13 | 13 |
14 final RegExp whitespace = new RegExp(r'\s'); | 14 final RegExp whitespace = new RegExp(r'\s'); |
15 | 15 |
16 /** | 16 /** |
17 * Convert the HTML in [desc] into text, word wrapping at width [width]. | 17 * Convert the HTML in [desc] into text, word wrapping at width [width]. |
18 * | 18 * |
19 * If [javadocStyle] is true, then the output is compatable with Javadoc, | 19 * If [javadocStyle] is true, then the output is compatable with Javadoc, |
20 * which understands certain HTML constructs. | 20 * which understands certain HTML constructs. |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 writeln(line); | 236 writeln(line); |
237 line = word; | 237 line = word; |
238 } | 238 } |
239 } else { | 239 } else { |
240 line = word; | 240 line = word; |
241 } | 241 } |
242 word = ''; | 242 word = ''; |
243 } | 243 } |
244 } | 244 } |
245 } | 245 } |
OLD | NEW |