3 ms·
One of the pain points of using this kind of tools is handling syntax highlighted code blocks. How does html-to-markdown perform in such scenarios?
by juliuskiesian 2y ago
One of the pain points of using this kind of tools is handling syntax highlighted code blocks. How does html-to-markdown perform in such scenarios?
- JohannesKauf 2y agoYeah 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/main/plugin/commonmark/testdata/GoldenFiles/code.out.md https://github.com/JohannesKaufmann/html-to-markdown/blob/ma...