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

Side by Side Diff: pkg/docgen/lib/src/dart2yaml.dart

Issue 202193002: pkg/dartdoc: moving files around, fix library names (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * This library is used to convert data from a map to a YAML string. 6 * This library is used to convert data from a map to a YAML string.
7 */ 7 */
8 library dart2yaml; 8 library docgen.dart2yaml;
9 9
10 /** 10 /**
11 * Gets a String representing the input Map in YAML format. 11 * Gets a String representing the input Map in YAML format.
12 */ 12 */
13 String getYamlString(Map documentData) { 13 String getYamlString(Map documentData) {
14 StringBuffer yaml = new StringBuffer(); 14 StringBuffer yaml = new StringBuffer();
15 _addLevel(yaml, documentData, 0); 15 _addLevel(yaml, documentData, 0);
16 return yaml.toString(); 16 return yaml.toString();
17 } 17 }
18 18
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 /** 76 /**
77 * Based on the depth in the file, this function returns the correct spacing 77 * Based on the depth in the file, this function returns the correct spacing
78 * for an element in the YAML output. 78 * for an element in the YAML output.
79 */ 79 */
80 void _calcSpaces(int spaceLevel, StringBuffer yaml) { 80 void _calcSpaces(int spaceLevel, StringBuffer yaml) {
81 for (int i = 0; i < spaceLevel; i++) { 81 for (int i = 0; i < spaceLevel; i++) {
82 yaml.write(" "); 82 yaml.write(" ");
83 } 83 }
84 } 84 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698