News for hackers. Stuff that matters.
Re:Show HN: HTML-to-Markdown – convert entire websites to Ma... by JohannesKauf on Saturday November 09, 2024 @12:22PM (#42095562)
Yeah good point, that's actually difficult. They use many `<span>` html tags to color individual words and syntax.

But I wrote logic to handle that. It probably needs to be adapted at some point, but works surprisingly well. Have a look at the testdata files ("code.in.html" and "code.out.md" files [1]).

Feel free to give it a try & let me know if you notice any edge cases!

[1] https://github.com/JohannesKaufmann/html-to-markdown/blob/ma...

There are no comments on this comment yet.