Merge pull request #1181 from dart-lang/show_entire_first_line_text

show the entire text for the first line of dartdoc
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 026bcbe..5dbb7d2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,15 @@
+## 0.9.6+1
+* [health] remove an unneeded package dependency
+
+## 0.9.6
+* [bug] fix enum indexes (#1176).
+* [enhancement] added support for crossdart. If there is a `crossdart.json`
+  file in the input dir (which can be generated by Crossdart), it will use that
+  file to add links to `crossdart.info` in the source code block.
+
 ## 0.9.5
 * [enhancement] support for `@example` tag to inject sample code into comments.
-  eg. `{@example core/ts/bootstrap/bootstrap.dart region='bootstrap'}`, where 
+  eg. `{@example core/ts/bootstrap/bootstrap.dart region='bootstrap'}`, where
   path is path to source in the package examples directory, and region is
   specified by `#docregion` and `#enddocregion` in the file.
 * [enhancement] do not document if there is a `@nodoc` in the doc comment.
@@ -37,7 +46,7 @@
 ## 0.9.0
 * **BREAKING** works with Dart SDK 1.14.0 and above
 * [health] use package resource
-* [enhancement] add support for packages with `_embedder.yaml`  
+* [enhancement] add support for packages with `_embedder.yaml`
 * [bug] fix generating docs when input == '.'
 * [bug] modify showing constants so that there is no double `const` shown in
   value.
diff --git a/codereview.settings b/codereview.settings
new file mode 100644
index 0000000..d6d8a3b
--- /dev/null
+++ b/codereview.settings
@@ -0,0 +1,3 @@
+CODE_REVIEW_SERVER: https://codereview.chromium.org/
+VIEW_VC: https://github.com/dart-lang/dartdoc/commit/
+CC_LIST: reviews@dartlang.org
diff --git a/lib/dartdoc.dart b/lib/dartdoc.dart
index 471d6ab..7e00d1c 100644
--- a/lib/dartdoc.dart
+++ b/lib/dartdoc.dart
@@ -39,7 +39,7 @@
 
 const String name = 'dartdoc';
 // Update when pubspec version changes.
-const String version = '0.9.5';
+const String version = '0.9.6+1';
 
 final String defaultOutDir = p.join('doc', 'api');
 
diff --git a/lib/src/model.dart b/lib/src/model.dart
index 2d242d1..f34802b 100644
--- a/lib/src/model.dart
+++ b/lib/src/model.dart
@@ -694,8 +694,9 @@
   List<EnumField> get constants {
     if (_constants != null) return _constants;
 
-    // is there a better way to get the index during a map() ?
-    var index = 0;
+    // This is a hack to give 'values' an index of -1 and all other fields
+    // their expected indicies. https://github.com/dart-lang/dartdoc/issues/1176
+    var index = -1;
 
     _constants = _cls.fields
         .where(isPublic)
diff --git a/lib/src/model_utils.dart b/lib/src/model_utils.dart
index b17eeca..ea64c19 100644
--- a/lib/src/model_utils.dart
+++ b/lib/src/model_utils.dart
@@ -4,15 +4,15 @@
 
 library dartdoc.model_utils;
 
-import 'dart:io';
 import 'dart:convert';
+import 'dart:io';
 
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source_io.dart';
-import 'package:path/path.dart' as p;
+
 import 'config.dart';
 
 final Map<String, String> _fileContents = <String, String>{};
diff --git a/pubspec.lock b/pubspec.lock
index f9fb6a4..1cfa4e2 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -54,7 +54,7 @@
       name: collection
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "1.5.1"
+    version: "1.8.0"
   contrast:
     description:
       name: contrast
@@ -127,12 +127,6 @@
       url: "https://pub.dartlang.org"
     source: hosted
     version: "2.2.1"
-  librato:
-    description:
-      name: librato
-      url: "https://pub.dartlang.org"
-    source: hosted
-    version: "0.0.3"
   logging:
     description:
       name: logging
@@ -288,7 +282,7 @@
       name: test
       url: "https://pub.dartlang.org"
     source: hosted
-    version: "0.12.13+1"
+    version: "0.12.14"
   typed_data:
     description:
       name: typed_data
@@ -343,4 +337,4 @@
       url: "https://pub.dartlang.org"
     source: hosted
     version: "2.1.8"
-sdk: ">=1.14.0 <1.18.0"
+sdk: ">=1.14.0 <1.19.0"
diff --git a/pubspec.yaml b/pubspec.yaml
index 7d7ec7a..b41bef7 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,6 +1,6 @@
 name: dartdoc
 # Also update the `version` field in lib/dartdoc.dart.
-version: 0.9.5
+version: 0.9.6+1
 author: Dart Team <misc@dartlang.org>
 description: A documentation generator for Dart.
 homepage: https://github.com/dart-lang/dartdoc
@@ -24,7 +24,6 @@
   den_api: ^0.1.0
   grinder: ^0.8.0
   http: ^0.11.0
-  librato: ^0.0.3
   pub_semver: ^1.0.0
   test: ^0.12.0
   which: ^0.1.3
diff --git a/test/compare_output_test.dart b/test/compare_output_test.dart
index 381ada2..89592f1 100644
--- a/test/compare_output_test.dart
+++ b/test/compare_output_test.dart
@@ -60,8 +60,8 @@
         tempDir.path
       ];
 
-      var result =
-          Process.runSync('dart', args, workingDirectory: _testPackagePath);
+      var result = Process.runSync(Platform.resolvedExecutable, args,
+          workingDirectory: _testPackagePath);
 
       if (result.exitCode != 0) {
         print(result.exitCode);
@@ -129,8 +129,8 @@
         tempDir.path
       ];
 
-      var result =
-          Process.runSync('dart', args, workingDirectory: _testPackagePath);
+      var result = Process.runSync(Platform.resolvedExecutable, args,
+          workingDirectory: _testPackagePath);
 
       if (result.exitCode != 0) {
         print(result.exitCode);
diff --git a/test/model_test.dart b/test/model_test.dart
index febfcb3..2007786 100644
--- a/test/model_test.dart
+++ b/test/model_test.dart
@@ -728,7 +728,16 @@
       var dog = animal.constants.firstWhere((f) => f.name == 'DOG');
       expect(dog.linkedName, equals('DOG'));
       expect(dog.isConst, isTrue);
-      expect(dog.constantValue, equals('const Animal(2)'));
+      expect(dog.constantValue, equals('const Animal(1)'));
+    });
+
+    test('constants have correct indicies', () {
+      String valueByName(var name) {
+        return animal.constants.firstWhere((f) => f.name == name).constantValue;
+      }
+      expect(valueByName('CAT'), equals('const Animal(0)'));
+      expect(valueByName('DOG'), equals('const Animal(1)'));
+      expect(valueByName('HORSE'), equals('const Animal(2)'));
     });
 
     test('has a single `index` property', () {
@@ -934,7 +943,7 @@
       new File(p.join(Directory.current.path, "crossdart.json"))
           .writeAsStringSync("""
               {"testing/test_package/lib/fake.dart":
-                {"references":[{"offset":5806,"end":5809,"remotePath":"http://www.example.com/fake.dart"}]}}
+                {"references":[{"offset":1069,"end":1072,"remotePath":"http://www.example.com/fake.dart"}]}}
       """);
 
       initializeConfig(addCrossdart: true, inputDir: Directory.current);
diff --git a/testing/test_package/lib/fake.dart b/testing/test_package/lib/fake.dart
index 4d72163..d7367ea 100644
--- a/testing/test_package/lib/fake.dart
+++ b/testing/test_package/lib/fake.dart
@@ -50,6 +50,19 @@
 
 import 'two_exports.dart' show BaseClass;
 
+class HasGenerics<X, Y, Z> {
+  HasGenerics(X x, Y y, Z z) {}
+
+  X returnX() => null;
+
+  Z returnZ() => null;
+
+  Z doStuff(String s, X x) => null;
+
+  /// Converts itself to a map.
+  Map<X, Y> convertToMap() => null;
+}
+
 Map<dynamic, String> mapWithDynamicKeys = {};
 
 /// Useful for annotations.
@@ -257,19 +270,6 @@
   static const Foo2 BAZ = const Foo2(1);
 }
 
-class HasGenerics<X, Y, Z> {
-  HasGenerics(X x, Y y, Z z) {}
-
-  X returnX() => null;
-
-  Z returnZ() => null;
-
-  Z doStuff(String s, X x) => null;
-
-  /// Converts itself to a map.
-  Map<X, Y> convertToMap() => null;
-}
-
 class OtherGenericsThing<A> {
   HasGenerics<A, Cool, String> convert() => null;
 }
diff --git a/testing/test_package_docs/ex/Animal-class.html b/testing/test_package_docs/ex/Animal-class.html
index 6ea47ba..0ed70f4 100644
--- a/testing/test_package_docs/ex/Animal-class.html
+++ b/testing/test_package_docs/ex/Animal-class.html
@@ -143,7 +143,7 @@
         <dd>
           <p></p>
           <div>
-            <span class="signature"><code>const Animal(1)</code></span>
+            <span class="signature"><code>const Animal(0)</code></span>
           </div>
         </dd>
         <dt id="DOG" class="constant">
@@ -153,7 +153,7 @@
         <dd>
           <p></p>
           <div>
-            <span class="signature"><code>const Animal(2)</code></span>
+            <span class="signature"><code>const Animal(1)</code></span>
           </div>
         </dd>
         <dt id="HORSE" class="constant">
@@ -163,7 +163,7 @@
         <dd>
           <p></p>
           <div>
-            <span class="signature"><code>const Animal(3)</code></span>
+            <span class="signature"><code>const Animal(2)</code></span>
           </div>
         </dd>
         <dt id="values" class="constant">
diff --git a/testing/test_package_docs/ex/Dog-class.html b/testing/test_package_docs/ex/Dog-class.html
index c8a6440..8429704 100644
--- a/testing/test_package_docs/ex/Dog-class.html
+++ b/testing/test_package_docs/ex/Dog-class.html
@@ -134,7 +134,8 @@
   <div class="col-xs-12 col-sm-9 col-md-8 main-content">
 
     <section class="desc markdown">
-      <p>implements <a href="ex/Cat-class.html">Cat</a>, <a href="ex/E-class.html">E</a></p>
+      <p>implements <a href="ex/Cat-class.html">Cat</a>, <a href="ex/E-class.html">E</a>
+{@example core/pipes/ts/slice_pipe/slice_pipe_example.ts region='SlicePipe_list'}</p>
     </section>
     
     <section>
diff --git a/testing/test_package_docs/ex/ex-library.html b/testing/test_package_docs/ex/ex-library.html
index aebd8d7..2aed234 100644
--- a/testing/test_package_docs/ex/ex-library.html
+++ b/testing/test_package_docs/ex/ex-library.html
@@ -335,7 +335,8 @@
           <span class="name "><a href="ex/Dog-class.html">Dog</a></span>
         </dt>
         <dd>
-          <p>implements <a href="ex/Cat-class.html">Cat</a>, <a href="ex/E-class.html">E</a></p>
+          <p>implements <a href="ex/Cat-class.html">Cat</a>, <a href="ex/E-class.html">E</a>
+{@example core/pipes/ts/slice_pipe/slice_pipe_example.ts region='SlicePipe_list'}</p>
         </dd>
         <dt id="E">
           <span class="name "><a href="ex/E-class.html">E</a></span>
diff --git a/testing/test_package_docs/fake/Color-class.html b/testing/test_package_docs/fake/Color-class.html
index 26c1631..ee05144 100644
--- a/testing/test_package_docs/fake/Color-class.html
+++ b/testing/test_package_docs/fake/Color-class.html
@@ -157,7 +157,7 @@
         <dd>
           <p></p>
           <div>
-            <span class="signature"><code>const Color(5)</code></span>
+            <span class="signature"><code>const Color(4)</code></span>
           </div>
         </dd>
         <dt id="GREEN" class="constant">
@@ -167,7 +167,7 @@
         <dd>
           <p></p>
           <div>
-            <span class="signature"><code>const Color(4)</code></span>
+            <span class="signature"><code>const Color(3)</code></span>
           </div>
         </dd>
         <dt id="INDIGO" class="constant">
@@ -177,7 +177,7 @@
         <dd>
           <p></p>
           <div>
-            <span class="signature"><code>const Color(6)</code></span>
+            <span class="signature"><code>const Color(5)</code></span>
           </div>
         </dd>
         <dt id="ORANGE" class="constant">
@@ -187,7 +187,7 @@
         <dd>
           <p>Orange</p>
           <div>
-            <span class="signature"><code>const Color(2)</code></span>
+            <span class="signature"><code>const Color(1)</code></span>
           </div>
         </dd>
         <dt id="RED" class="constant">
@@ -197,7 +197,7 @@
         <dd>
           <p>Red</p>
           <div>
-            <span class="signature"><code>const Color(1)</code></span>
+            <span class="signature"><code>const Color(0)</code></span>
           </div>
         </dd>
         <dt id="values" class="constant">
@@ -217,7 +217,7 @@
         <dd>
           <p></p>
           <div>
-            <span class="signature"><code>const Color(7)</code></span>
+            <span class="signature"><code>const Color(6)</code></span>
           </div>
         </dd>
         <dt id="YELLOW" class="constant">
@@ -227,7 +227,7 @@
         <dd>
           <p></p>
           <div>
-            <span class="signature"><code>const Color(3)</code></span>
+            <span class="signature"><code>const Color(2)</code></span>
           </div>
         </dd>
       </dl>
diff --git a/testing/test_package_docs/fake/ExtraSpecialList-class.html b/testing/test_package_docs/fake/ExtraSpecialList-class.html
index d64d8a1..c6ded43 100644
--- a/testing/test_package_docs/fake/ExtraSpecialList-class.html
+++ b/testing/test_package_docs/fake/ExtraSpecialList-class.html
@@ -678,7 +678,7 @@
           </span>
         </dt>
         <dd class="inherited">
-          <p>Returns an Iterable that provides all but the first <code>count</code> elements.<a href="fake/ExtraSpecialList/skip.html">&hellip;</a>
+          <p>Returns an <code>Iterable</code> that provides all but the first <code>count</code> elements.<a href="fake/ExtraSpecialList/skip.html">&hellip;</a>
 </p>
           <div class="features">inherited</div>
         </dd>
@@ -688,7 +688,7 @@
           </span>
         </dt>
         <dd class="inherited">
-          <p>Returns an Iterable that skips leading elements while <code>test</code> is satisfied.<a href="fake/ExtraSpecialList/skipWhile.html">&hellip;</a>
+          <p>Returns an <code>Iterable</code> that skips leading elements while <code>test</code> is satisfied.<a href="fake/ExtraSpecialList/skipWhile.html">&hellip;</a>
 </p>
           <div class="features">inherited</div>
         </dd>
diff --git a/testing/test_package_docs/fake/ExtraSpecialList/firstWhere.html b/testing/test_package_docs/fake/ExtraSpecialList/firstWhere.html
index 4d0c5ae..5b16055 100644
--- a/testing/test_package_docs/fake/ExtraSpecialList/firstWhere.html
+++ b/testing/test_package_docs/fake/ExtraSpecialList/firstWhere.html
@@ -154,7 +154,7 @@
     </section>
     <section class="desc markdown">
       <p>Returns the first element that satisfies the given predicate <code>test</code>.</p>
-<p>Iterates through elements and returns the first to satsify <code>test</code>.</p>
+<p>Iterates through elements and returns the first to satisfy <code>test</code>.</p>
 <p>If no element satisfies <code>test</code>, the result of invoking the <code>orElse</code>
 function is returned.
 If <code>orElse</code> is omitted, it defaults to throwing a <code>StateError</code>.</p>
diff --git a/testing/test_package_docs/fake/ExtraSpecialList/lastWhere.html b/testing/test_package_docs/fake/ExtraSpecialList/lastWhere.html
index 142f9ca..713b272 100644
--- a/testing/test_package_docs/fake/ExtraSpecialList/lastWhere.html
+++ b/testing/test_package_docs/fake/ExtraSpecialList/lastWhere.html
@@ -160,7 +160,7 @@
 The default implementation iterates elements in iteration order,
 checks <code>test(element)</code> for each,
 and finally returns that last one that matched.</p>
-<p>If no element satsfies <code>test</code>, the result of invoking the <code>orElse</code>
+<p>If no element satisfies <code>test</code>, the result of invoking the <code>orElse</code>
 function is returned.
 If <code>orElse</code> is omitted, it defaults to throwing a <code>StateError</code>.</p>
     </section>
diff --git a/testing/test_package_docs/fake/ExtraSpecialList/map.html b/testing/test_package_docs/fake/ExtraSpecialList/map.html
index 5fc4a92..bd04725 100644
--- a/testing/test_package_docs/fake/ExtraSpecialList/map.html
+++ b/testing/test_package_docs/fake/ExtraSpecialList/map.html
@@ -158,7 +158,7 @@
 <p>This method returns a view of the mapped elements. As long as the
 returned <code>Iterable</code> is not iterated over, the supplied function <code>f</code> will
 not be invoked. The transformed elements will not be cached. Iterating
-multiple times over the the returned <code>Iterable</code> will invoke the supplied
+multiple times over the returned <code>Iterable</code> will invoke the supplied
 function <code>f</code> multiple times on the same element.</p>
 <p>Methods on the returned iterable are allowed to omit calling <code>f</code>
 on any element where the result isn't needed.
diff --git a/testing/test_package_docs/fake/ExtraSpecialList/skip.html b/testing/test_package_docs/fake/ExtraSpecialList/skip.html
index 58e392a..f5c8ada 100644
--- a/testing/test_package_docs/fake/ExtraSpecialList/skip.html
+++ b/testing/test_package_docs/fake/ExtraSpecialList/skip.html
@@ -153,13 +153,16 @@
       <span class="name ">skip</span>(<wbr><span class="parameter" id="skip-param-count"><span class="type-annotation">int</span> <span class="parameter-name">count</span></span>)
     </section>
     <section class="desc markdown">
-      <p>Returns an Iterable that provides all but the first <code>count</code> elements.</p>
+      <p>Returns an <code>Iterable</code> that provides all but the first <code>count</code> elements.</p>
 <p>When the returned iterable is iterated, it starts iterating over <code>this</code>,
 first skipping past the initial <code>count</code> elements.
 If <code>this</code> has fewer than <code>count</code> elements, then the resulting Iterable is
 empty.
 After that, the remaining elements are iterated in the same order as
 in this iterable.</p>
+<p>Some iterables may be able to find later elements without first iterating
+through earlier elements, for example when iterating a <code>List</code>.
+Such iterables are allowed to ignore the initial skipped elements.</p>
 <p>The <code>count</code> must not be negative.</p>
     </section>
     
diff --git a/testing/test_package_docs/fake/ExtraSpecialList/skipWhile.html b/testing/test_package_docs/fake/ExtraSpecialList/skipWhile.html
index 8ad3726..b1f76be 100644
--- a/testing/test_package_docs/fake/ExtraSpecialList/skipWhile.html
+++ b/testing/test_package_docs/fake/ExtraSpecialList/skipWhile.html
@@ -153,14 +153,14 @@
       <span class="name ">skipWhile</span>(<wbr><span class="parameter" id="skipWhile-param-test"><span class="type-annotation">bool</span> <span class="parameter-name">test</span>(<span class="parameter" id="test-param-element"><span class="type-annotation">E</span> <span class="parameter-name">element</span></span>)</span>)
     </section>
     <section class="desc markdown">
-      <p>Returns an Iterable that skips leading elements while <code>test</code> is satisfied.</p>
-<p>The filtering happens lazily. Every new Iterator of the returned
-Iterable iterates over all elements of <code>this</code>.</p>
+      <p>Returns an <code>Iterable</code> that skips leading elements while <code>test</code> is satisfied.</p>
+<p>The filtering happens lazily. Every new <code>Iterator</code> of the returned
+iterable iterates over all elements of <code>this</code>.</p>
 <p>The returned iterable provides elements by iterating this iterable,
 but skipping over all initial elements where <code>test(element)</code> returns
 true. If all elements satisfy <code>test</code> the resulting iterable is empty,
 otherwise it iterates the remaining elements in their original order,
-starting with the first element for which <code>test(element)</code> returns false,</p>
+starting with the first element for which <code>test(element)</code> returns <code>false</code>.</p>
     </section>
     
     
diff --git a/testing/test_package_docs/fake/ExtraSpecialList/where.html b/testing/test_package_docs/fake/ExtraSpecialList/where.html
index b2acbbe..882c828 100644
--- a/testing/test_package_docs/fake/ExtraSpecialList/where.html
+++ b/testing/test_package_docs/fake/ExtraSpecialList/where.html
@@ -157,10 +157,11 @@
 predicate <code>test</code>.</p>
 <p>The matching elements have the same order in the returned iterable
 as they have in <code>iterator</code>.</p>
-<p>This method returns a view of the mapped elements. As long as the
-returned <code>Iterable</code> is not iterated over, the supplied function <code>test</code> will
-not be invoked. Iterating will not cache results, and thus iterating
-multiple times over the returned <code>Iterable</code> will invoke the supplied
+<p>This method returns a view of the mapped elements.
+As long as the returned <code>Iterable</code> is not iterated over,
+the supplied function <code>test</code> will not be invoked.
+Iterating will not cache results, and thus iterating multiple times over
+the returned <code>Iterable</code> may invoke the supplied
 function <code>test</code> multiple times on the same element.</p>
     </section>
     
diff --git a/testing/test_package_docs/fake/SpecialList-class.html b/testing/test_package_docs/fake/SpecialList-class.html
index f8854e3..7238343 100644
--- a/testing/test_package_docs/fake/SpecialList-class.html
+++ b/testing/test_package_docs/fake/SpecialList-class.html
@@ -680,7 +680,7 @@
           </span>
         </dt>
         <dd class="inherited">
-          <p>Returns an Iterable that provides all but the first <code>count</code> elements.<a href="fake/SpecialList/skip.html">&hellip;</a>
+          <p>Returns an <code>Iterable</code> that provides all but the first <code>count</code> elements.<a href="fake/SpecialList/skip.html">&hellip;</a>
 </p>
           <div class="features">inherited</div>
         </dd>
@@ -690,7 +690,7 @@
           </span>
         </dt>
         <dd class="inherited">
-          <p>Returns an Iterable that skips leading elements while <code>test</code> is satisfied.<a href="fake/SpecialList/skipWhile.html">&hellip;</a>
+          <p>Returns an <code>Iterable</code> that skips leading elements while <code>test</code> is satisfied.<a href="fake/SpecialList/skipWhile.html">&hellip;</a>
 </p>
           <div class="features">inherited</div>
         </dd>
diff --git a/testing/test_package_docs/fake/SpecialList/firstWhere.html b/testing/test_package_docs/fake/SpecialList/firstWhere.html
index d04f2c0..8c7131a 100644
--- a/testing/test_package_docs/fake/SpecialList/firstWhere.html
+++ b/testing/test_package_docs/fake/SpecialList/firstWhere.html
@@ -154,7 +154,7 @@
     </section>
     <section class="desc markdown">
       <p>Returns the first element that satisfies the given predicate <code>test</code>.</p>
-<p>Iterates through elements and returns the first to satsify <code>test</code>.</p>
+<p>Iterates through elements and returns the first to satisfy <code>test</code>.</p>
 <p>If no element satisfies <code>test</code>, the result of invoking the <code>orElse</code>
 function is returned.
 If <code>orElse</code> is omitted, it defaults to throwing a <code>StateError</code>.</p>
diff --git a/testing/test_package_docs/fake/SpecialList/lastWhere.html b/testing/test_package_docs/fake/SpecialList/lastWhere.html
index 725354c..52d4725 100644
--- a/testing/test_package_docs/fake/SpecialList/lastWhere.html
+++ b/testing/test_package_docs/fake/SpecialList/lastWhere.html
@@ -160,7 +160,7 @@
 The default implementation iterates elements in iteration order,
 checks <code>test(element)</code> for each,
 and finally returns that last one that matched.</p>
-<p>If no element satsfies <code>test</code>, the result of invoking the <code>orElse</code>
+<p>If no element satisfies <code>test</code>, the result of invoking the <code>orElse</code>
 function is returned.
 If <code>orElse</code> is omitted, it defaults to throwing a <code>StateError</code>.</p>
     </section>
diff --git a/testing/test_package_docs/fake/SpecialList/map.html b/testing/test_package_docs/fake/SpecialList/map.html
index 332fd4a..bae4337 100644
--- a/testing/test_package_docs/fake/SpecialList/map.html
+++ b/testing/test_package_docs/fake/SpecialList/map.html
@@ -158,7 +158,7 @@
 <p>This method returns a view of the mapped elements. As long as the
 returned <code>Iterable</code> is not iterated over, the supplied function <code>f</code> will
 not be invoked. The transformed elements will not be cached. Iterating
-multiple times over the the returned <code>Iterable</code> will invoke the supplied
+multiple times over the returned <code>Iterable</code> will invoke the supplied
 function <code>f</code> multiple times on the same element.</p>
 <p>Methods on the returned iterable are allowed to omit calling <code>f</code>
 on any element where the result isn't needed.
diff --git a/testing/test_package_docs/fake/SpecialList/skip.html b/testing/test_package_docs/fake/SpecialList/skip.html
index 57d74ae..4e4a612 100644
--- a/testing/test_package_docs/fake/SpecialList/skip.html
+++ b/testing/test_package_docs/fake/SpecialList/skip.html
@@ -153,13 +153,16 @@
       <span class="name ">skip</span>(<wbr><span class="parameter" id="skip-param-count"><span class="type-annotation">int</span> <span class="parameter-name">count</span></span>)
     </section>
     <section class="desc markdown">
-      <p>Returns an Iterable that provides all but the first <code>count</code> elements.</p>
+      <p>Returns an <code>Iterable</code> that provides all but the first <code>count</code> elements.</p>
 <p>When the returned iterable is iterated, it starts iterating over <code>this</code>,
 first skipping past the initial <code>count</code> elements.
 If <code>this</code> has fewer than <code>count</code> elements, then the resulting Iterable is
 empty.
 After that, the remaining elements are iterated in the same order as
 in this iterable.</p>
+<p>Some iterables may be able to find later elements without first iterating
+through earlier elements, for example when iterating a <code>List</code>.
+Such iterables are allowed to ignore the initial skipped elements.</p>
 <p>The <code>count</code> must not be negative.</p>
     </section>
     
diff --git a/testing/test_package_docs/fake/SpecialList/skipWhile.html b/testing/test_package_docs/fake/SpecialList/skipWhile.html
index 0734603..3f8cf41 100644
--- a/testing/test_package_docs/fake/SpecialList/skipWhile.html
+++ b/testing/test_package_docs/fake/SpecialList/skipWhile.html
@@ -153,14 +153,14 @@
       <span class="name ">skipWhile</span>(<wbr><span class="parameter" id="skipWhile-param-test"><span class="type-annotation">bool</span> <span class="parameter-name">test</span>(<span class="parameter" id="test-param-element"><span class="type-annotation">E</span> <span class="parameter-name">element</span></span>)</span>)
     </section>
     <section class="desc markdown">
-      <p>Returns an Iterable that skips leading elements while <code>test</code> is satisfied.</p>
-<p>The filtering happens lazily. Every new Iterator of the returned
-Iterable iterates over all elements of <code>this</code>.</p>
+      <p>Returns an <code>Iterable</code> that skips leading elements while <code>test</code> is satisfied.</p>
+<p>The filtering happens lazily. Every new <code>Iterator</code> of the returned
+iterable iterates over all elements of <code>this</code>.</p>
 <p>The returned iterable provides elements by iterating this iterable,
 but skipping over all initial elements where <code>test(element)</code> returns
 true. If all elements satisfy <code>test</code> the resulting iterable is empty,
 otherwise it iterates the remaining elements in their original order,
-starting with the first element for which <code>test(element)</code> returns false,</p>
+starting with the first element for which <code>test(element)</code> returns <code>false</code>.</p>
     </section>
     
     
diff --git a/testing/test_package_docs/fake/SpecialList/where.html b/testing/test_package_docs/fake/SpecialList/where.html
index 9f59406..2704e87 100644
--- a/testing/test_package_docs/fake/SpecialList/where.html
+++ b/testing/test_package_docs/fake/SpecialList/where.html
@@ -157,10 +157,11 @@
 predicate <code>test</code>.</p>
 <p>The matching elements have the same order in the returned iterable
 as they have in <code>iterator</code>.</p>
-<p>This method returns a view of the mapped elements. As long as the
-returned <code>Iterable</code> is not iterated over, the supplied function <code>test</code> will
-not be invoked. Iterating will not cache results, and thus iterating
-multiple times over the returned <code>Iterable</code> will invoke the supplied
+<p>This method returns a view of the mapped elements.
+As long as the returned <code>Iterable</code> is not iterated over,
+the supplied function <code>test</code> will not be invoked.
+Iterating will not cache results, and thus iterating multiple times over
+the returned <code>Iterable</code> may invoke the supplied
 function <code>test</code> multiple times on the same element.</p>
     </section>
     
diff --git a/testing/test_package_docs/index.html b/testing/test_package_docs/index.html
index b926c86..986a42a 100644
--- a/testing/test_package_docs/index.html
+++ b/testing/test_package_docs/index.html
@@ -4,7 +4,7 @@
   <meta charset="utf-8">
   <meta http-equiv="X-UA-Compatible" content="IE=edge">
   <meta name="viewport" content="width=device-width, initial-scale=1">
-  <meta name="generator" content="made with love by dartdoc 0.9.4">
+  <meta name="generator" content="made with love by dartdoc 0.9.6">
   <meta name="description" content="test_package API docs, for the Dart programming language.">
   <title>test_package - Dart API docs</title>
 
diff --git a/testing/test_package_docs/static-assets/styles.css b/testing/test_package_docs/static-assets/styles.css
index 1be8d4c..ab649eb 100644
--- a/testing/test_package_docs/static-assets/styles.css
+++ b/testing/test_package_docs/static-assets/styles.css
@@ -178,6 +178,16 @@
   margin-top: 1em;
 }
 
+.crossdart-link {
+  border-bottom: 1px solid #dfdfdf;
+  text-decoration: none;
+}
+
+.crossdart-link:hover {
+  border-bottom: 1px solid #aaa;
+  text-decoration: none;
+}
+
 @media(max-width: 768px) {
   nav .container {
     width: 100%
diff --git a/tool/doc_packages.dart b/tool/doc_packages.dart
index 75cd60e..258fcfd 100644
--- a/tool/doc_packages.dart
+++ b/tool/doc_packages.dart
@@ -14,8 +14,6 @@
 import 'package:pub_semver/pub_semver.dart';
 import 'package:yaml/yaml.dart';
 
-// TODO: Use isolates; Platform.numberOfProcessors.
-
 const String _rootDir = 'pub.dartlang.org';
 
 /// To use:
diff --git a/tool/grind.dart b/tool/grind.dart
index bd39841..ec2e096 100644
--- a/tool/grind.dart
+++ b/tool/grind.dart
@@ -11,7 +11,6 @@
 import 'package:grinder/grinder.dart';
 import 'package:html/dom.dart';
 import 'package:html/parser.dart' show parse;
-import 'package:librato/librato.dart';
 import 'package:path/path.dart' as path;
 import 'package:yaml/yaml.dart' as yaml;
 
@@ -24,8 +23,7 @@
 findTransformers() async {
   var dotPackages = new File('.packages');
   if (!dotPackages.existsSync()) {
-    print('No .packages file found in ${Directory.current}');
-    exit(1);
+    fail('No .packages file found in ${Directory.current}');
   }
 
   var foundAnyTransformers = false;
@@ -39,16 +37,16 @@
     if (pubspec.existsSync()) {
       var yamlDoc = yaml.loadYaml(pubspec.readAsStringSync());
       if (yamlDoc['transformers'] != null) {
-        print('${mapping.first} has transformers!');
+        log('${mapping.first} has transformers!');
         foundAnyTransformers = true;
       }
     } else {
-      print('No pubspec found for ${mapping.first}, tried ${pubspec}');
+      log('No pubspec found for ${mapping.first}, tried ${pubspec}');
     }
   });
 
   if (!foundAnyTransformers) {
-    print('No transformers found');
+    log('No transformers found');
   }
 }
 
@@ -76,20 +74,15 @@
 
 @Task('Checks that CHANGELOG mentions current version')
 checkChangelogHasVersion() async {
-  // TODO: use fail() when
-  // https://github.com/google/grinder.dart/issues/288 lands
-
   var changelog = new File('CHANGELOG.md');
   if (!changelog.existsSync()) {
-    print('ERROR: No CHANGELOG.md found in ${Directory.current}');
-    exit(1);
+    fail('ERROR: No CHANGELOG.md found in ${Directory.current}');
   }
 
   Pubspec pubspec = await Pubspec.load();
 
   if (!changelog.readAsLinesSync().contains('## ${pubspec.version}')) {
-    print('ERROR: CHANGELOG.md does not mention version ${pubspec.version}');
-    exit(1);
+    fail('ERROR: CHANGELOG.md does not mention version ${pubspec.version}');
   }
 }
 
@@ -143,18 +136,15 @@
 Future buildSdkDocs() async {
   delete(docsDir);
   log('building SDK docs');
-  int sdkDocsGenTime = await _runAsyncTimed(() async {
-    var process = await Process.start('dart', [
-      'bin/dartdoc.dart',
-      '--output',
-      '${docsDir.path}',
-      '--sdk-docs',
-      '--show-progress'
-    ]);
-    stdout.addStream(process.stdout);
-    stderr.addStream(process.stderr);
-  });
-  return _uploadStats(sdkDocsGenTime);
+  var process = await Process.start(Platform.resolvedExecutable, [
+    'bin/dartdoc.dart',
+    '--output',
+    '${docsDir.path}',
+    '--sdk-docs',
+    '--show-progress'
+  ]);
+  stdout.addStream(process.stdout);
+  stderr.addStream(process.stderr);
 }
 
 @Task('Validate the SDK doc build.')
@@ -164,7 +154,6 @@
 // if I run grind build-sdk-docs manually.
 // See https://github.com/google/grinder.dart/issues/291
 validateSdkDocs() {
-  // TODO(keertip): change number to 17 once 1.13 is stable
   const expectedLibCount = 18;
   var indexHtml = joinFile(docsDir, ['index.html']);
   if (!indexHtml.existsSync()) {
@@ -214,31 +203,6 @@
 @Depends(analyze, test, testDartdoc)
 buildbot() => null;
 
-Future<int> _runAsyncTimed(Future callback()) async {
-  var stopwatch = new Stopwatch()..start();
-  await callback();
-  stopwatch.stop();
-  return stopwatch.elapsedMilliseconds;
-}
-
-Future _uploadStats(int sdkDocsGenTime) async {
-  Map env = Platform.environment;
-
-  if (env.containsKey('LIBRATO_USER') && env.containsKey('TRAVIS_COMMIT')) {
-    Librato librato = new Librato.fromEnvVars();
-    log('Uploading stats to ${librato.baseUrl}');
-    LibratoStat sdkDocsGenTimeStat =
-        new LibratoStat('sdk-docs-gen-time', sdkDocsGenTime);
-    await librato.postStats([sdkDocsGenTimeStat]);
-    String commit = env['TRAVIS_COMMIT'];
-    LibratoLink link = new LibratoLink(
-        'github', 'https://github.com/dart-lang/dart-pad/commit/${commit}');
-    LibratoAnnotation annotation = new LibratoAnnotation(commit,
-        description: 'Commit ${commit}', links: [link]);
-    return librato.createAnnotation('build_ui', annotation);
-  }
-}
-
 // TODO: check http links, check links in <link>
 // Also TODO: put a guard for infinite link checking
 @Task('Check links')
@@ -258,12 +222,11 @@
   var fullPath = path.normalize("$origin$pathToCheck");
   if (visited.contains(fullPath)) return;
   visited.add(fullPath);
-  //print("Visiting $fullPath");
 
   File file = new File("$fullPath");
   if (!file.existsSync()) {
     error = true;
-    print('  * Not found: $fullPath from $source');
+    log('  * Not found: $fullPath from $source');
     return;
   }
   Document doc = parse(file.readAsStringSync());
@@ -272,17 +235,14 @@
   if (base != null) {
     baseHref = base.attributes['href'];
   }
-  //print("  Base is $baseHref");
   List<Element> links = doc.querySelectorAll('a');
   links
       .map((link) => link.attributes['href'])
       .where((href) => href != null)
       .forEach((href) {
     if (!href.startsWith('http') && !href.contains('#')) {
-      //print("  Found link: $href");
       var full = '${path.dirname(pathToCheck)}/$baseHref/$href';
       var normalized = path.normalize(full);
-      //print("    => $full\n      => $normalized");
       _doCheck(origin, visited, normalized, error, pathToCheck);
     }
   });
@@ -303,13 +263,7 @@
 @Task('update test_package_docs')
 updateTestPackageDocs() {
   var options = new RunOptions(workingDirectory: 'testing/test_package');
-
-  var dir = new Directory('test_package_docs');
-
-  if (dir.existsSync()) {
-    dir.deleteSync(recursive: true);
-  }
-
+  delete(getDir('test_package_docs'));
   Dart.run('../../bin/dartdoc.dart',
       arguments: ['--no-include-source', '--output', '../test_package_docs'],
       runOptions: options);