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

feat: expose shikijiSetup hook #3344

Merged
merged 2 commits into from Dec 16, 2023
Merged

feat: expose shikijiSetup hook #3344

merged 2 commits into from Dec 16, 2023

Conversation

antfu
Copy link
Member

@antfu antfu commented Dec 15, 2023

Similar to the markdown-it config hooks:

/**
* Setup markdown-it instance before applying plugins
*/
preConfig?: (md: MarkdownIt) => void
/**
* Setup markdown-it instance
*/
config?: (md: MarkdownIt) => void
, this would allow users to have a chance to get the highlighter instance and load more custom themes etc.

I am building the docs for Shikiji itself using VitePress, where I need to load all the themes for demonstrating purposes. Before this, it's only possible to load up to two themes.

@brc-dd brc-dd merged commit d12e23d into main Dec 16, 2023
7 checks passed
@brc-dd brc-dd deleted the feat/shikiji-options branch December 16, 2023 05:33
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants