rasendubi / uniorg

An accurate Org-mode parser for JavaScript/TypeScript
https://oleksii.shmalko.com/uniorg
GNU General Public License v3.0
256 stars 24 forks source link

feat: add options to uniorgStringify to customize handlers #107

Closed Delapouite closed 3 months ago

Delapouite commented 3 months ago

Hi @rasendubi

This PR is a follow-up to the discussions we had last year in https://github.com/rasendubi/uniorg/issues/72 about letting the user having more controls about the final output.

I followed your advice and imitated what's already existing with uniorg2rehype. Therefore, uniorgStringify can now accept an optional handlers configuration.

I've added 3 tests to illustrate various situations and also a short documentation in the README.

Don't hesitate to tell me if something is missing. Thanks.

changeset-bot[bot] commented 3 months ago

🦋 Changeset detected

Latest commit: 53bc6253193a8bd4e67193d6812fe276c6064b25

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ---------------- | ----- | | uniorg-stringify | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

vercel[bot] commented 3 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
org-blog-starter ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 18, 2024 5:09pm
rasendubi commented 3 months ago

Hey @Delapouite. Thanks for the pull request!

I have pushed a couple of commits to your branch — mostly a refactor but there are two behavior changes:

If these sound good to you, we can merge and release.

Delapouite commented 3 months ago

Great! Thanks again for taking the time to make these adjustments to my initial attempt.