PoiScript / orgize

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

Extract exporters into a common trait #67

Closed justinabrahms closed 7 months ago

justinabrahms commented 11 months ago

This should fix #64 #66

This will allow folks to write a custom exporter without having to re-implement the write logic, as well as reduces code duplication within the two exporters.

PoiScript commented 7 months ago

@justinabrahms thanks you for contributing!

HtmlHandler trait is being removed in v0.10, and superseded by Traverser trait.

To reduce the code duplication between traverser with same logic, orgize now provides a forward_handler macros. You can use it to "extend" a existing traverser without too much hassle. You can check the example code in https://github.com/PoiScript/orgize/blob/v0.10/examples/html-slugify.rs

I'm going close this issue. Hope you like the v0.10 release, and feel free to leave any feedback in https://github.com/PoiScript/orgize/issues/70