commonmark / cmark

CommonMark parsing and rendering library and program in C
Other
1.63k stars 546 forks source link

Syntax highlighting support in <code> #110

Closed pickfire closed 8 years ago

pickfire commented 8 years ago

Hi, I would like to know if there is any way I can add syntax hightlighting in <code> block.

jgm commented 8 years ago

You might check out jgm/lcmark. It has a sample filter for doing highlighting (in the examples directory).

+++ Ivan Tham [Mar 17 16 10:47 ]:

Hi, I would like to know if there is any way I can add syntax hightlighting in block.

— You are receiving this because you are subscribed to this thread. Reply to this email directly or [1]view it on GitHub

References

  1. https://github.com/jgm/cmark/issues/110
pickfire commented 8 years ago

Ah, looks nice, I didn't know about that. But it might be slower than cmark as it is not written in C.

Thanks a lot.

jgm commented 8 years ago

+++ Ivan Tham [Mar 17 16 22:35 ]:

Ah, looks nice, I didn't know about that. But it might be slower than cmark as it is not written in C.

lcmark is a wrapper over libcmark, so it's really pretty fast, nearly as fast as cmark! The only slow part is the highlighting which shells out to a python program.

pickfire commented 8 years ago

Oh, now I really hope that there is a highlight program in C.