Alir3z4 / Alir3z4/html2text

Honor markdownlint standards

Open
#426 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
2.2k
Forks
296
PR merge metrics
No merged PRs in 30d

Description


Html2text version: 2024.2.26
Python version: 3.11.12

[markdownlint](https://github.com/DavidAnson/markdownlint/tree/v0.34.0) rules are used by Visual Studio Code and other editors [and Ruby](https://github.com/markdownlint/markdownlint). It would be great if html2text generated Markdown that was as compliant these rules as possible. That way, additional cleanup would not be needed.

Common lint rule violations I observed when converting my blog from HTML to Markdown: with html2text

- [MD102 - Multiple consecutive blank lines](https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md012.md)
- [MD007 - Unordered list indentation](https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md007.md)
- There's probably a similar issue with ordered lists, but I didn't see it because I don't use them often :)
- [MD022 - Headings should be surrounded by blank lines](https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md027.md)
- [MD027 - Multiple spaces after blockquote symbol](https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md027.md)
- This showed up when having lists inside of a blockquote
- [MD026 - Trailing punctuation in heading](https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md026.md)
- This happened due to a line break in the middle of a long heading (see #424)
- [MD009 - Trailing spaces](https://github.com/DavidAnson/markdownlint/blob/v0.34.0/doc/md009.md)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.