| Index: utils/dartdoc/dartdoc.dart
|
| diff --git a/utils/dartdoc/dartdoc.dart b/utils/dartdoc/dartdoc.dart
|
| index 56c941465158fd305a5b956d6a8c596e6bde664c..96a60e8cb2370a7736855c83670a7d0c3a6744d4 100644
|
| --- a/utils/dartdoc/dartdoc.dart
|
| +++ b/utils/dartdoc/dartdoc.dart
|
| @@ -905,6 +905,7 @@ class Dartdoc {
|
|
|
| /** Gets the URL for the documentation for [type]. */
|
| String typeUrl(Type type) {
|
| + if (type.isTop) return '${sanitize(type.library.name)}.html';
|
| // Always get the generic type to strip off any type parameters or
|
| // arguments. If the type isn't generic, genericType returns `this`, so it
|
| // works for non-generic types too.
|
| @@ -913,7 +914,10 @@ class Dartdoc {
|
|
|
| /** Gets the URL for the documentation for [member]. */
|
| String memberUrl(Member member) {
|
| - return '${typeUrl(member.declaringType)}#${member.name}';
|
| + final typeUrl = typeUrl(member.declaringType);
|
| + if (!member.isConstructor) return '$typeUrl#${member.name}';
|
| + if (member.constructorName == '') return '$typeUrl#new:${member.name}';
|
| + return '$typeUrl#new:${member.name}.${member.constructorName}';
|
| }
|
|
|
| /** Gets the anchor id for the document for [member]. */
|
|
|