spring-io / spring-asciidoctor-backends

A backend for Asciidoctor used to produce Spring styled HTML
Apache License 2.0
77 stars 15 forks source link

Supporting more languages from highlight.js #78

Closed eallais closed 1 year ago

eallais commented 1 year ago

I am wondering how to add more languages that the one currently supported by this project. I did not mange to include new highlight.js languages, do we need an enhancement to register them ? Thanks

philwebb commented 1 year ago

The supported languages are here, however, I've not been able to upgrade to a recent highlight.js (see https://github.com/spring-io/spring-asciidoctor-backends/commit/d2d09faf673424e0cf10d869767e48681ff8d595)

eallais commented 1 year ago

Do you have a simple procedure to add new highlight.js languages such as PowerShell or Properties or I need to fork the project and add them myself ?

Thanks

philwebb commented 1 year ago

You should find properties are already there. I'm happy to add powershell.

eallais commented 1 year ago

In that case it would be great to also have Windows Batch language support (called dos in highlight.js)

Thank you

eallais commented 1 year ago

BTW, do we have a particular reason to declare twice bash with another highlight.je language ?

https://github.com/spring-io/spring-asciidoctor-backends/blob/44f1c61a238125ea3c176925408f38d345508865/src/main/js/site/highlight.js#L40

philwebb commented 1 year ago

That looks like an error