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

bin+lib fast_html2md

Library and binary to convert simple html documents into markdown

9 releases

0.0.9 Dec 28, 2023
0.0.8 Dec 28, 2023

#1699 in Development tools

Download history 50/week @ 2023-12-22 12/week @ 2023-12-29 81/week @ 2024-01-12 66/week @ 2024-01-19 24/week @ 2024-01-26 9/week @ 2024-02-02 1/week @ 2024-02-09 10/week @ 2024-02-16 19/week @ 2024-02-23 6/week @ 2024-03-01 12/week @ 2024-03-08 4/week @ 2024-03-15 21/week @ 2024-03-29 101/week @ 2024-04-05

127 downloads per month
Used in 2 crates (via tpnote-lib)

GPL-3.0+

54KB
856 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

~4–12MB
~123K SLoC