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

Unified Diff: pkg/docgen/lib/src/models/model_helpers.dart

Issue 692753004: Generate docgen information with dart: names rather than dart- or dart-dom- (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/docgen/lib/src/models/model_helpers.dart
diff --git a/pkg/docgen/lib/src/models/model_helpers.dart b/pkg/docgen/lib/src/models/model_helpers.dart
index 359706d61dcb8b2983ffe50caa60b2bf9f8e8dc9..e131472f0ea01e30d571e2a9473599def7a5b312 100644
--- a/pkg/docgen/lib/src/models/model_helpers.dart
+++ b/pkg/docgen/lib/src/models/model_helpers.dart
@@ -22,8 +22,16 @@ import 'method.dart';
import 'parameter.dart';
import 'variable.dart';
-String getLibraryDocName(LibraryMirror mirror) =>
- dart2js_util.qualifiedNameOf(mirror).replaceAll('.', '-');
+String getLibraryDocName(LibraryMirror mirror) {
+ var dotsFixed = dart2js_util.qualifiedNameOf(mirror).replaceAll('.', '-');
+ if (dotsFixed.startsWith('dart-dom-')) {
+ return dotsFixed.replaceFirst("dart-dom-", "dart:");
+ } else if (dotsFixed.startsWith("dart-")) {
+ return dotsFixed.replaceFirst("dart-", "dart:");
+ } else {
+ return dotsFixed;
+ }
+}
/// Expand the method map [mapToExpand] into a more detailed map that
/// separates out setters, getters, constructors, operators, and methods.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698