#convert-html #markdown-converter #html #markdown-html #markdown #converter

bin+lib html2md

Library and binary to convert simple html documents into markdown

17 releases

0.2.14 Dec 17, 2022
0.2.13 Jul 16, 2021
0.2.11 May 15, 2021
0.2.10 Aug 1, 2020
0.2.4 Jul 28, 2018

#131 in Development tools

Download history 1140/week @ 2024-08-01 1788/week @ 2024-08-08 1385/week @ 2024-08-15 1417/week @ 2024-08-22 1227/week @ 2024-08-29 1259/week @ 2024-09-05 1053/week @ 2024-09-12 1191/week @ 2024-09-19 1382/week @ 2024-09-26 1097/week @ 2024-10-03 1013/week @ 2024-10-10 1185/week @ 2024-10-17 1095/week @ 2024-10-24 1343/week @ 2024-10-31 1302/week @ 2024-11-07 1849/week @ 2024-11-14

5,776 downloads per month
Used in 37 crates (28 directly)

GPL-3.0+

58KB
836 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

~5–11MB
~132K SLoC