Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for user customizable renderer scripts #9

Merged
merged 10 commits into from Feb 24, 2022

Conversation

mallardduck
Copy link
Contributor

Per the title this PR allows a user to set a customizable renderer script. This can be helpful if someone wants to further control how Shiki renders a block to HTML. In my case the use-case I'm hoping to support is the same one used in the tests. Modifying the output to include CSS properties/variables.

It's accomplished simply by allowing the Process CWD path to be customized. This way someone can easily copy the existing renderer script and make any needed modifications. Then they just call the static method somewhere before using the Shiki class to render a code block.

@mallardduck mallardduck changed the title All for user customizable renderer scripts Allow for user customizable renderer scripts Dec 24, 2021
@riasvdv riasvdv merged commit 2427a86 into spatie:main Feb 24, 2022
@riasvdv
Copy link
Member

riasvdv commented Feb 24, 2022

Thanks! Lost track of this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants