#html #markdown #converter

bin+lib html2md

Library and binary to convert simple html documents into markdown

12 releases

✓ Uses Rust 2018 edition

0.2.9 Apr 11, 2019
0.2.8 Mar 28, 2019
0.2.7 Feb 12, 2019
0.2.5 Aug 7, 2018
0.2.4 Jul 28, 2018

#98 in Parser implementations

Download history 56/week @ 2019-03-25 14/week @ 2019-04-01 19/week @ 2019-04-08 11/week @ 2019-04-15 18/week @ 2019-04-22 17/week @ 2019-04-29 12/week @ 2019-05-06 24/week @ 2019-05-13 52/week @ 2019-05-20 30/week @ 2019-05-27 18/week @ 2019-06-03 15/week @ 2019-06-10 42/week @ 2019-06-17 156/week @ 2019-06-24 125/week @ 2019-07-01

93 downloads per month

GPL-3.0+

45KB
747 lines

HTML2MD

Library to convert simple html documents into markdown flavor. Implements markdown as written on its inception page.

Features

Currently supported:

  • Lists (and inner lists)
  • Headers
  • Quotes (and inner quotes)
  • Paragraphs
  • Horizontal rulers
  • Images and links
  • Tables
  • Formatting (bold, italic, strikethrough, underline)
  • Code

Limitations

  • no markdown flavors support (-/+ unordered list styles, ##/== headers etc.)
  • doesn't yet detect code style

Used libraries

html5ever - Servo egine HTML parsing library, used to convert html input to DOM

regex - PCRE support in Rust, used to correct whitespaces

Contributions

You may create merge request or bug/enhancement issue right here on GitLab, or send formatted patch via e-mail. For details see CONTRIBUTING.md file in this repo.

License

Copyright (C) 2018-2019  Oleg `Kanedias` Chernovskiy

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

Dependencies

~3.5MB
~79K SLoC