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

Custom highlight #754

Closed
4 tasks done
zRains opened this issue Jun 8, 2022 · 1 comment · Fixed by #857
Closed
4 tasks done

Custom highlight #754

zRains opened this issue Jun 8, 2022 · 1 comment · Fixed by #857
Labels
build Related to the build system enhancement New feature or request

Comments

@zRains
Copy link
Contributor

zRains commented Jun 8, 2022

Is your feature request related to a problem? Please describe.

no

Describe the solution you'd like

If the highlight function is passed in options: MarkdownOptions, this function will be invoked, otherwise the default will be used.

 const md = MarkdownIt({ 
   html: true, 
   linkify: true, 
   highlight: options.highlight || await highlight(options.theme), 
   ...options 
 }) as MarkdownRenderer 

Describe alternatives you've considered

No response

Additional context

No response

Validations

@kiaking kiaking added enhancement New feature or request build Related to the build system labels Jun 14, 2022
@kiaking
Copy link
Member

kiaking commented Jun 14, 2022

Yeah why not. I think this can be useful, and simple to implement. If anyone wants to tackle this, PR is welcome!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
build Related to the build system enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants