| Index: pkg/docgen/lib/dart2yaml.dart
|
| diff --git a/pkg/docgen/lib/dart2yaml.dart b/pkg/docgen/lib/dart2yaml.dart
|
| index 57ca7fe3938605f55a8dfac4efe5199699e4e91f..343b61f97b2b161eb7505bcecb5d23cb0a9e61ae 100644
|
| --- a/pkg/docgen/lib/dart2yaml.dart
|
| +++ b/pkg/docgen/lib/dart2yaml.dart
|
| @@ -7,6 +7,8 @@
|
| */
|
| library dart2yaml;
|
|
|
| +import 'dart:collection';
|
| +
|
| /**
|
| * Gets a String representing the input Map in YAML format.
|
| */
|
| @@ -26,10 +28,11 @@ String getYamlString(Map documentData) {
|
| */
|
| void _addLevel(StringBuffer yaml, Map documentData, int level,
|
| {bool isList: false}) {
|
| - // Since the ordering of the keys could be non-deterministic, the keys
|
| - // are sorted to ensure consistency in the output.
|
| + // The order of the keys could be nondeterministic, but it is insufficient
|
| + // to just sort the keys no matter what, as their order could be significant
|
| + // (i.e. parameters to a method). The order of the keys should be enforced
|
| + // by the caller of this function.
|
| var keys = documentData.keys.toList();
|
| - keys.sort();
|
| keys.forEach((key) {
|
| _calcSpaces(level, yaml);
|
| // Only the first entry of the map should be preceeded with a '-' since
|
|
|