18 releases

0.2.15 Jan 12, 2025
0.2.14 Dec 17, 2022
0.2.13 Jul 16, 2021
0.2.10 Aug 1, 2020
0.2.4 Jul 28, 2018

#144 in Text processing

Download history 1789/week @ 2025-01-12 1665/week @ 2025-01-19 2000/week @ 2025-01-26 3005/week @ 2025-02-02 2631/week @ 2025-02-09 2593/week @ 2025-02-16 2843/week @ 2025-02-23 2160/week @ 2025-03-02 2582/week @ 2025-03-09 4049/week @ 2025-03-16 2449/week @ 2025-03-23 2223/week @ 2025-03-30 2710/week @ 2025-04-06 1802/week @ 2025-04-13 2344/week @ 2025-04-20 1984/week @ 2025-04-27

9,087 downloads per month
Used in 45 crates (34 directly)

GPL-3.0+

57KB
840 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 engine 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.

See COPYING.md for special terms on dual-licensing.

Dependencies

~3.5–10MB
~104K SLoC