mapbox / rehype-prism

rehype plugin to highlight code blocks in HTML with Prism (via refractor)
MIT License
178 stars 24 forks source link

Add `syntaxes` option to register new syntaxes #32

Open mertyildiran opened 2 years ago

mertyildiran commented 2 years ago

Adds an option named syntax to provide a way to register a new Prism language definition. See.

hugocaillard commented 2 years ago

Awesome @mertyildiran, exactly what I was looking for 👍 Would be great to this it merged and release.

Although it works great for my use case, shouldn't it be syntaxes: refractor.RefractorSyntax[]? So that multiple syntaxes could be registered?

hugocaillard commented 2 years ago

Tested on a personal project, works great 💯

hugocaillard commented 2 years ago

Is this repo still maintained @katydecorah @davidtheclark? (Sorry I'm not really sure who to mention)

mertyildiran commented 2 years ago

@hugocaillard I thought you were one of the maintainers.

davidtheclark commented 2 years ago

I'd recommend forking the library if you'd like to move it forward.

mertyildiran commented 2 years ago

@davidtheclark yeah, I know but this is a dependency of a dependency for me. So I need to fork two libraries which I don't want to do that. See https://github.com/uiwjs/react-textarea-code-editor/pull/85

I'll have to do that only if I cannot made them merged in a reasonable time.

mertyildiran commented 2 years ago

@katydecorah any update on this PR?

katydecorah commented 2 years ago

@mertyildiran I no longer work at Mapbox and unfortunately I'm not sure who will maintain this repository moving forward.

mertyildiran commented 2 years ago

@katydecorah I understand. Thank you so much!