vb64 / markdown-pdf

Markdown to pdf renderer
MIT License
21 stars 2 forks source link

A syntax highlighter for code blocks #12

Open vb64 opened 4 months ago

vb64 commented 4 months ago

https://stackoverflow.com/questions/23825317/how-to-convert-markdown-css-pdf/78079072#78079072

gabrielbdornas commented 1 week ago

Great feature to add to this lib. By the way, congratulations on the work, it is awesome!

I'm wondering if it would be possible to use 3º party libraries instead of writing our on CSS code, as suggested in this stackoverflow answer

vb64 commented 1 week ago

Great feature to add to this lib.

Ok, I'll try to implement this issue in the next version.

Unfortunately, I am currently very busy with another project, so I cannot give any ETA.

You can try to implement this feature yourself, prepare a pull request and become a co-author of this library.

To do this, you need to explore the way that markdown-it-py uses to generate html with syntax highlighting. As far as I understand, this requires additional markdown-it-py plugins.