| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 * **docgen** is a tool for creating machine readable representations of Dart | 6 * **docgen** is a tool for creating machine readable representations of Dart |
| 7 * code metadata, including: classes, members, comments and annotations. | 7 * code metadata, including: classes, members, comments and annotations. |
| 8 * | 8 * |
| 9 * docgen is run on a `.dart` file or a directory containing `.dart` files. | 9 * docgen is run on a `.dart` file or a directory containing `.dart` files. |
| 10 * | 10 * |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 if (commentText == null) { | 223 if (commentText == null) { |
| 224 commentText = comment.trimmedText; | 224 commentText = comment.trimmedText; |
| 225 } else { | 225 } else { |
| 226 commentText = '$commentText ${comment.trimmedText}'; | 226 commentText = '$commentText ${comment.trimmedText}'; |
| 227 } | 227 } |
| 228 } | 228 } |
| 229 } | 229 } |
| 230 }); | 230 }); |
| 231 commentText = commentText == null ? '' : | 231 commentText = commentText == null ? '' : |
| 232 markdown.markdownToHtml(commentText.trim(), linkResolver: linkResolver) | 232 markdown.markdownToHtml(commentText.trim(), linkResolver: linkResolver) |
| 233 .replaceAll('\n', ''); | 233 .replaceAll('\n', ' '); |
| 234 return commentText; | 234 return commentText; |
| 235 } | 235 } |
| 236 | 236 |
| 237 /** | 237 /** |
| 238 * Converts all [_] references in comments to <code>_</code>. | 238 * Converts all [_] references in comments to <code>_</code>. |
| 239 */ | 239 */ |
| 240 // TODO(tmandel): Create proper links for [_] style markdown based | 240 // TODO(tmandel): Create proper links for [_] style markdown based |
| 241 // on scope once layout of viewer is finished. | 241 // on scope once layout of viewer is finished. |
| 242 markdown.Node fixReference(String name, LibraryMirror currentLibrary, | 242 markdown.Node fixReference(String name, LibraryMirror currentLibrary, |
| 243 ClassMirror currentClass, MemberMirror currentMember) { | 243 ClassMirror currentClass, MemberMirror currentMember) { |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 parameterMap['name'] = name; | 509 parameterMap['name'] = name; |
| 510 parameterMap['qualifiedname'] = qualifiedName; | 510 parameterMap['qualifiedname'] = qualifiedName; |
| 511 parameterMap['optional'] = isOptional.toString(); | 511 parameterMap['optional'] = isOptional.toString(); |
| 512 parameterMap['named'] = isNamed.toString(); | 512 parameterMap['named'] = isNamed.toString(); |
| 513 parameterMap['default'] = hasDefaultValue.toString(); | 513 parameterMap['default'] = hasDefaultValue.toString(); |
| 514 parameterMap['type'] = type; | 514 parameterMap['type'] = type; |
| 515 parameterMap['value'] = defaultValue; | 515 parameterMap['value'] = defaultValue; |
| 516 return parameterMap; | 516 return parameterMap; |
| 517 } | 517 } |
| 518 } | 518 } |
| OLD | NEW |