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

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

Issue 16839004: Moved docgen out of the sdk into pkg/ (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 /** 1 /**
Emily Fortuna 2013/06/12 21:10:56 please add copyright notice at the top of this fil
Tate Mandel 2013/06/12 21:18:41 Done.
2 * This library is used to convert data from a map to a YAML string. 2 * This library is used to convert data from a map to a YAML string.
3 */ 3 */
4 library dart2yaml; 4 library dart2yaml;
5 5
6 /** 6 /**
7 * Gets a String representing the input Map in YAML format. 7 * Gets a String representing the input Map in YAML format.
8 */ 8 */
9 String getYamlString(Map documentData) { 9 String getYamlString(Map documentData) {
10 StringBuffer yaml = new StringBuffer(); 10 StringBuffer yaml = new StringBuffer();
11 _addLevel(yaml, documentData, 0); 11 _addLevel(yaml, documentData, 0);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 /** 54 /**
55 * Based on the depth in the file, this function returns the correct spacing 55 * Based on the depth in the file, this function returns the correct spacing
56 * for an element in the YAML output. 56 * for an element in the YAML output.
57 */ 57 */
58 void _calcSpaces(int spaceLevel, StringBuffer yaml) { 58 void _calcSpaces(int spaceLevel, StringBuffer yaml) {
59 for (int i = 0; i < spaceLevel; i++) { 59 for (int i = 0; i < spaceLevel; i++) {
60 yaml.write(" "); 60 yaml.write(" ");
61 } 61 }
62 } 62 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698