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

Unified Diff: utils/apidoc/apidoc.dart

Issue 9315026: Cleanup mdn scripts (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review fixes 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/html/src/DOMWrapperBase.dart ('k') | utils/apidoc/mdn/README.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/apidoc/apidoc.dart
diff --git a/utils/apidoc/apidoc.dart b/utils/apidoc/apidoc.dart
index ae9e061eba2b0bee5122bd37236f480e67e9dfe7..1a859b5bcb9d177fea638eb0c3ff5436562e17ce 100644
--- a/utils/apidoc/apidoc.dart
+++ b/utils/apidoc/apidoc.dart
@@ -16,6 +16,8 @@
HtmlDiff _diff;
+final GET_PREFIX = 'get:';
+
void main() {
var files = new NodeFileSystem();
parseOptions('../../frog', [] /* args */, files);
@@ -278,11 +280,14 @@ class Apidoc extends doc.Dartdoc {
final mdnType = mdn[member.declaringType.name];
if (mdnType == null) return null;
-
+ var nameToFind = member.name;
+ if (nameToFind.startsWith(GET_PREFIX)) {
+ nameToFind = nameToFind.substring(GET_PREFIX.length);
+ }
var mdnMember = null;
- for (final thisMember in mdnType['members']) {
- if (thisMember['name'] == member.name) {
- mdnMember = thisMember;
+ for (final candidateMember in mdnType['members']) {
+ if (candidateMember['name'] == nameToFind) {
+ mdnMember = candidateMember;
break;
}
}
@@ -299,8 +304,6 @@ class Apidoc extends doc.Dartdoc {
* different library than [member].
*/
String _linkMember(Member member) {
- final GET_PREFIX = 'get:';
-
final typeName = member.declaringType.name;
var memberName = '$typeName.${member.name}';
if (member.isConstructor || member.isFactory) {
« no previous file with comments | « client/html/src/DOMWrapperBase.dart ('k') | utils/apidoc/mdn/README.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698