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

Side by Side Diff: utils/dartdoc/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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « utils/dartdoc/inline_parser.dart ('k') | utils/dartdoc/test/markdown_tests.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 /// Parses text in markdown format. Use this entrypoint if you want to parse 5 /// Parses text in a markdown-like format and renders to HTML.
6 /// markdown from your own Dart code. To parse markdown by running the script
7 /// directly from the command line, see markdown.dart.
8 #library('markdown'); 6 #library('markdown');
9 7
10 #source('ast.dart'); 8 #source('ast.dart');
11 #source('block_parser.dart'); 9 #source('block_parser.dart');
12 #source('html_renderer.dart'); 10 #source('html_renderer.dart');
13 #source('inline_parser.dart'); 11 #source('inline_parser.dart');
14 12
15 /// Converts the given string of markdown to HTML. 13 /// Converts the given string of markdown to HTML.
16 String markdownToHtml(String markdown) { 14 String markdownToHtml(String markdown) {
17 final document = new Document(); 15 final document = new Document();
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 /// `<em>this <strong>is</strong> a</em> <code>markdown</code>`. 102 /// `<em>this <strong>is</strong> a</em> <code>markdown</code>`.
105 List<Node> parseInline(String text) => new InlineParser(text, this).parse(); 103 List<Node> parseInline(String text) => new InlineParser(text, this).parse();
106 } 104 }
107 105
108 class Link { 106 class Link {
109 final String id; 107 final String id;
110 final String url; 108 final String url;
111 final String title; 109 final String title;
112 Link(this.id, this.url, this.title); 110 Link(this.id, this.url, this.title);
113 } 111 }
OLDNEW
« no previous file with comments | « utils/dartdoc/inline_parser.dart ('k') | utils/dartdoc/test/markdown_tests.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698