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

Option to use highlightjs for syntax highlighting #450

Open
harpocrates opened this issue Sep 25, 2020 · 6 comments
Open

Option to use highlightjs for syntax highlighting #450

harpocrates opened this issue Sep 25, 2020 · 6 comments

Comments

@harpocrates
Copy link

The API for highlightjs seems to be pretty much the same as prettyify. I think both are quite widely used. However,

  • highlightjs is actively maintained and developed while prettyify is no longer maintained
  • highlightjs supports more languages

Would it be feasible to add an option for choosing the syntax highlighting library to use?

@ennru
Copy link
Member

ennru commented Sep 26, 2020

Sure, I would be OK with switching to highlightjs and dropping prettify.

Are you in a position to suggest the necessary changes in a PR?

@harpocrates
Copy link
Author

Are you in a position to suggest the necessary changes in a PR?

Not yet - I wanted to check this would be well-received first before moving forward with the actual changes. Are you sure it is OK to drop prettify, or should it be kept around as an option (checking as I imagine highlightjs will have subtly different syntax definitions and color schemes such that code in existing doc projects like akka-docs might end up looking slightly different)?

@ennru
Copy link
Member

ennru commented Sep 26, 2020

I don't think it is a problem if the syntax colouring slightly changes. highlightjs seems to offer a vast set of predefined designs. Configuring that will be more useful than switching between prettify and highlightjs.

@harpocrates
Copy link
Author

OK thanks; that definitely lowers the bar for changes I'd have to make/test. I'll aim to open a PR for this in the next week or so.

@raboof
Copy link
Contributor

raboof commented Sep 27, 2020

Going straight for highlightjs seems fine to me too.

I'm not sure if the fiddle integration interacts with the syntax highlighting at all - that might be one thing to double-check.

@pvlugter
Copy link
Member

Switching to highlightjs sounds good to me too. Thanks @harpocrates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants