tag | aca6ed46d487119654f751da1a2f62c8af09eca6 | |
---|---|---|
tagger | Kevin Moore <github@j832.com> | Sat Jan 03 14:50:33 2015 -0800 |
object | 95b78b75a9850ce3d61ad701b3be558dd4928fcd |
commit | 95b78b75a9850ce3d61ad701b3be558dd4928fcd | [log] [tgz] |
---|---|---|
author | David Peek <ninjascript@gmail.com> | Tue Apr 08 12:39:59 2014 +1000 |
committer | David Peek <ninjascript@gmail.com> | Tue Apr 08 12:39:59 2014 +1000 |
tree | e59804370b41dd1d54b8c578a28db599b9cb69e7 | |
parent | 24377e1e418a7ecc7f81f3feb10cefddd1516f7c [diff] | |
parent | acf460ecae947efb81e38dc1c49654f07cc24733 [diff] |
Merge pull request #16 from kevmoo/type_issue_15 Fix type issues, lock down types (breaking changes), bumped to 0.7.0
This is a standalone version of the dartdoc markdown library. It parses markdown and converts it to HTML.
You can see a demo running in the browser here (tested in Chrome and Dartium). The client library currently only supports HTML syntax highlighting do to some dart:io dependencies in libcss and analyzer_experimental.
Add this to your pubspec.yaml
(or create it):
dependencies: markdown: any
Then run the Pub Package Manager (comes with the Dart SDK):
pub install
import 'package:markdown/markdown.dart' show markdownToHtml; main() { print(markdownToHtml('Hello *Markdown*')); }
Version 0.4 adds support for GitHub style triple backtick code blocks, with built in Dart syntax coloring. Custom classifiers can be added using a syntax list:
import 'package:markdown/markdown.dart'; main() { List<InlineSyntax> nyanSyntax = [new TextSyntax('nyan', sub: '~=[,,_,,]:3')]; print(markdownToHtml('nyan', inlineSyntaxes: nyanSyntax)); }