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

Side by Side Diff: pkg/docgen/lib/docgen.dart

Issue 18112004: Escaping backslashes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « pkg/docgen/lib/dart2yaml.dart ('k') | no next file » | 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) 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
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
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 }
OLDNEW
« no previous file with comments | « pkg/docgen/lib/dart2yaml.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698