| Index: utils/dartdoc/html_renderer.dart
|
| diff --git a/utils/dartdoc/html_renderer.dart b/utils/dartdoc/html_renderer.dart
|
| index ec4bebb1d00316bb270b484f635f59d5fdfe4490..14b7bb03fd0b72a779dab12c1746c635f89ea5f7 100644
|
| --- a/utils/dartdoc/html_renderer.dart
|
| +++ b/utils/dartdoc/html_renderer.dart
|
| @@ -34,7 +34,12 @@ class HtmlRenderer implements NodeVisitor {
|
|
|
| buffer.add('<${element.tag}');
|
|
|
| - for (final name in element.attributes.getKeys()) {
|
| + // Sort the keys so that we generate stable output.
|
| + // TODO(rnystrom): This assumes getKeys() returns a fresh mutable
|
| + // collection.
|
| + final attributeNames = element.attributes.getKeys();
|
| + attributeNames.sort((a, b) => a.compareTo(b));
|
| + for (final name in attributeNames) {
|
| buffer.add(' $name="${element.attributes[name]}"');
|
| }
|
|
|
|
|