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

Unified Diff: utils/markdown/markdown.dart

Issue 8953042: Move markdown library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add markdown tests to dartdoc. Created 9 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « utils/markdown/lib.dart ('k') | utils/markdown/test/markdown_tests.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/markdown/markdown.dart
diff --git a/utils/markdown/markdown.dart b/utils/markdown/markdown.dart
deleted file mode 100644
index bf1d691b2fe09239a59d31ab6d052d047736f474..0000000000000000000000000000000000000000
--- a/utils/markdown/markdown.dart
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Standalone script for parsing markdown from files and converting to HTML.
-#library('markdown_app');
-
-#import('lib.dart');
-
-main() {
- final args = (new Options()).arguments;
-
- if (args.length > 2) {
- print('Usage:');
- print(' dart markdown.dart <inputfile> [<outputfile>]');
- print('');
- print('Reads a file containing markdown and converts it to HTML.');
- print('If <outputfile> is omitted, prints to stdout.');
- return;
- }
-
- final source = readFile(args[0]);
- final html = markdownToHtml(source);
-
- if (args.length == 1) {
- print(html);
- } else {
- writeFile(args[1], html);
- }
-}
-
-String readFile(String path) {
- final file = (new File(path)).openSync();
- final length = file.lengthSync();
- final buffer = new List<int>(length);
- final bytes = file.readListSync(buffer, 0, length);
- file.closeSync();
- return new String.fromCharCodes(buffer);
-}
-
-void writeFile(String path, String text) {
- final file = new File(path);
- final stream = file.openOutputStream();
- stream.write(text.charCodes());
- stream.close();
-}
« no previous file with comments | « utils/markdown/lib.dart ('k') | utils/markdown/test/markdown_tests.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698