Breakdance is a node.js library for converting HTML to markdown. Highly pluggable, flexible and easy to use. It's time for your markup to get down.
Breakdance is a node.js library for converting HTML to markdown. You can use breakdance to:
Breakdance uses cheerio to parse HTML, and snapdragon for rendering, which provides granular control over the entire conversion process in a way that is easy to understand, reason about, and customize. If you see something you don't like, it's easy to change!
Generates well-formatted markdown
Every part of the conversion is customizable:
The following HTML table from bootstrap's docs:
Hover rowsAdd .table-hover to enable a hover state on table rows within a <tbody>.#First NameLast NameUsername1MarkOtto@mdo2JacobThornton@fat3Larrythe Bird
Would render to the following markdown:
## Hover rowsAdd `.table-hover` to enable a hover state on table rows within a `<tbody>`.| # | First Name | Last Name | Username || --- | --- | --- | --- || 1 | Mark | Otto | @mdo || 2 | Jacob | Thornton | @fat || 3 | Larry | the Bird | @twitter |
See the documentation for more examples.
Get updates on Breakdance's development and chat with the project maintainers and community members.
breakdanceon packages which modify or add to the functionality of Breakdance when distributing through npm or similar delivery mechanisms.
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Please read the contributing guide for advice on opening issues, pull requests, and coding standards.
Changelog entries are classified using the following labels from keep-a-changelog:
added: for new features
changed: for changes in existing functionality
deprecated: for once-stable features removed in upcoming releases
removed: for deprecated features removed in this release
fixed: for any bug fixes
Custom labels used in this changelog:
dependencies: bumps dependencies
housekeeping: code re-organization, minor edits, or other changes that don't fit in one of the other categories.
<b>: now renders as
**bold**, same as
<i>: now renders as
_italics_, same as
<code>: improvements to whitespace handling
<code>: no longer renders empty tags
<p>: normalize Unicode
U+00A0non-breaking spaces to "normal" Unicode
U+0020spaces. Non-breaking spaces are useful in HTML, but cause flow problems in markdown.
options.trailingWhitespace, all previously undocumented options. See breakdance.io/options
<base>, closes issue #3
br. As a fallback, you can also use
breakdanceif there is a conflict. The CLI has not yet been documented, so hopefully this doesn't cause any issues for anyone.
keepEmptyoption, to selective keep empty tags that are omitted by built-in
utils.jsto breakdance-util, to allow plugin authors to use the same utilities as breakdance, for consistency.
(Changelog generated by helper-changelog)
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
$ npm install && npm test
This file was generated by verb-generate-readme, v0.5.0, on May 12, 2017.