OLD | NEW |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 /// Standalone script for parsing markdown from files and converting to HTML. | 5 /// Standalone script for parsing markdown from files and converting to HTML. |
6 #library('markdown_app'); | 6 #library('markdown_app'); |
7 | 7 |
8 #import('lib.dart'); | 8 #import('lib.dart'); |
9 | 9 |
10 main() { | 10 main() { |
(...skipping 26 matching lines...) Expand all Loading... |
37 file.closeSync(); | 37 file.closeSync(); |
38 return new String.fromCharCodes(buffer); | 38 return new String.fromCharCodes(buffer); |
39 } | 39 } |
40 | 40 |
41 void writeFile(String path, String text) { | 41 void writeFile(String path, String text) { |
42 final file = new File(path); | 42 final file = new File(path); |
43 final stream = file.openOutputStream(); | 43 final stream = file.openOutputStream(); |
44 stream.write(text.charCodes()); | 44 stream.write(text.charCodes()); |
45 stream.close(); | 45 stream.close(); |
46 } | 46 } |
OLD | NEW |