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

Side by Side Diff: utils/apidoc/apidoc.dart

Issue 9113094: Fix apidoc to work with latest frog and dartdoc. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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 | « utils/apidoc/apidoc ('k') | utils/apidoc/html_diff.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 * Generates the complete set of corelib reference documentation. 6 * Generates the complete set of corelib reference documentation.
7 */ 7 */
8 #library('apidoc'); 8 #library('apidoc');
9 9
10 #import('html_diff.dart'); 10 #import('html_diff.dart');
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 return ""; 153 return "";
154 } 154 }
155 } 155 }
156 156
157 /** 157 /**
158 * Returns additional Markdown-formatted documentation for [type], linking it to 158 * Returns additional Markdown-formatted documentation for [type], linking it to
159 * the corresponding `dart:html` or `dart:dom` [Type](s). If [type] is not in 159 * the corresponding `dart:html` or `dart:dom` [Type](s). If [type] is not in
160 * `dart:html` or `dart:dom`, returns no additional documentation. 160 * `dart:html` or `dart:dom`, returns no additional documentation.
161 */ 161 */
162 String getTypeDoc(Type type) { 162 String getTypeDoc(Type type) {
163 if (_diff.domTypesToHtml.containsKey(type)) { 163 var types = _diff.domTypesToHtml[type];
164 var htmlTypes = doc.joinWithCommas( 164 if (types != null && types.length > 0) {
165 map(_diff.domTypesToHtml[type], _linkType)); 165 final text = doc.joinWithCommas(map(types, _linkType));
166 return "_This corresponds to $htmlTypes in the [dart:html](../html.html) " + 166 return '_This corresponds to $text in the [dart:html](../html.html) ' +
167 "library._"; 167 'library._';
168 } else if (_diff.htmlTypesToDom.containsKey(type)) {
169 var domTypes = doc.joinWithCommas(
170 map(_diff.htmlTypesToDom[type], _linkType));
171 return "_This corresponds to $domTypes in the [dart:dom](../dom.html) " +
172 "library._";
173 } else {
174 return "";
175 } 168 }
169
170 types = _diff.htmlTypesToDom[type];
171 if (types != null && types.length > 0) {
172 final text = doc.joinWithCommas(map(types, _linkType));
173 return '_This corresponds to $text in the [dart:dom](../dom.html) ' +
174 'library._';
175 }
176
177 return '';
176 } 178 }
OLDNEW
« no previous file with comments | « utils/apidoc/apidoc ('k') | utils/apidoc/html_diff.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698