alexwforsythe / code-blocks

Syntax highlighting for Google Docs
https://www.alexwforsythe.com/code-blocks/
MIT License
695 stars 88 forks source link

Added graphql language #185

Closed nicolae-stroncea closed 1 year ago

nicolae-stroncea commented 2 years ago

Closes https://github.com/alexwforsythe/code-blocks/issues/171.

Highlight.js does not add new languages anymore, and instead encourages 3rd parties to develop their own packages that they will link to from here Supported Languages.

From the official docs:

Sadly, due to lack of maintainer time we no longer merge new languages grammars into the core library. Instead, the project works by encouraging 3rd party language grammar development by willing contributors ready to help and maintain them.

Therefore, to add support in code-blocks for new languages, packages for those languages will have to be explicitly pulled.

In this PR I've defined a function in which other languages can also be added in the future, add added graphql in there.

amomchilov commented 1 year ago

@alexwforsythe Any chance you can take a look into merging this?

awx-josh-fu commented 1 year ago

Please, I need this!

va3093 commented 1 year ago

V pumped for this.

amomchilov commented 1 year ago

@alexwforsythe Hey Alex, do you have any plans for when you'd cut a new release that contains this?

Funny enough, I have a tech design review on Monday, I would love to format my GraphQL blocks for it :D

nicolae-stroncea commented 1 year ago

on the subject, https://github.com/alexwforsythe/code-blocks/pull/216 needs to be approved for this PR to work correctly as currently the name of the function we're calling is different from the name of the function we wrote