PoiScript / orgize

A Rust library for parsing org-mode files.
https://poiscript.github.io/orgize/
MIT License
278 stars 34 forks source link

Allow overriding syntect theme #1

Closed zaynetro closed 4 years ago

zaynetro commented 4 years ago

Thanks for this project! This library is exactly what I was looking for.

One thing I was missing is ability to specify a different theme for code highlighting.

PoiScript commented 4 years ago

Thanks you for the pull request!

But I can't merge it, because I don't want to change the signature of the new function. The new function is useful when you want to chain a bundle of Handler quickly, like: SyntectHtmlHandler::new(FooHtmlHandler::new(BarHtmlHandler::new(DefaultHtmlHandler)))). If you want to configure the handler, I think that using the Default trait is a better option.

I just published a new commit a5809b29a67f629537f77d448a53b4089ab5d272 implementing this feature, if anything looks fine, I will also cut a new release. Thanks again!

zaynetro commented 4 years ago

Thanks! Looks good!

-------- Original Message -------- On 9 Oct 2019, 07:20, yūdachi wrote:

Thanks you for the pull request!

But I don't want to change the signature of the new function. The new function is useful when you want to chain a bundle of Handler quickly, like: SyntectHtmlHandler::new(FooHtmlHandler::new(BarHtmlHandler::new(DefaultHtmlHandler)))). If you want to configure the handler, I think that using the Default trait is a better option.

I just published a new commit a5809b2 implementing this feature, if anything looks fine, I will also cut a new release. Thanks again!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

PoiScript commented 4 years ago

I had published orgize 0.5.0 to the crates.io. You can now specify theme and background for highlighting. While the document is still is building, you can check the docstring from the source code directly for the basic usage.