html2md 0.2.0 copy "html2md: ^0.2.0" to clipboard
html2md: ^0.2.0 copied to clipboard

outdated

Convert html to markdown in Dart.

html2md #

Build status

Convert html to markdown in Dart. A simplify version of node's turndown.

Usage #

A simple usage example:

import 'package:html2md/html2md.dart' as html2md;

main() {
  var html = '<h1>HTML2MD Demo</h1>';
  print(html2md.convert(html));
}

Config #

You can config convert style by passing styleOptions to convert:

html2md.convert(html, styleOptions: { 'headingStyle': 'atx' });

The default and available style options:

Name Default Options
headingStyle "setext" "setext", "atx"
hr "* * *" "* * *", "- - -", "_ _ _"
bulletListMarker "*" "*", "-", "_"
codeBlockStyle "indented" "indented", "fenced"
fence "```" "```", "~~~"
emDelimiter "_" "_", "*"
strongDelimiter "**" "**", "__"
linkStyle "inlined" "inlined", "referenced"
linkReferenceStyle "full" "full", "collapsed", "shortcut"

Test #

pub run test

Features and bugs #

Please file feature requests and bugs at the issue tracker.

License #

Created from templates made available by Stagehand under a BSD-style license.

47
likes
0
pub points
95%
popularity

Publisher

unverified uploader

Convert html to markdown in Dart.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

html, path

More

Packages that depend on html2md