speced / respec

A tool for creating technical documents and web standards
https://respec.org/
Other
722 stars 389 forks source link

Consider use Prism instead of highlight.js #3003

Open sidvishnoi opened 4 years ago

sidvishnoi commented 4 years ago

Prism has:

Syntax highlighting comparison (color schemes are slightly different):

Highlight.js Prism
image image
image image
image image
image image
image image
image image
marcoscaceres commented 4 years ago

I honestly don't mind which one we use - I no longer maintain hljs, and if Prism has a good community that maintains the software, all the better. I like the hljs style more tho... it has better contrast for me.

saschanaz commented 4 years ago

I like the hljs style more tho... it has better contrast for me.

Can we control the CSS rules as we do in highlight.js?

sidvishnoi commented 4 years ago

Can we control the CSS rules as we do in highlight.js?

You mean the styling (assets/highlight.css), right? If that, yes.

saschanaz commented 4 years ago

Great, I vote for prism assuming that we can enhance the contrast. (And optionally upstream the changes 😁)

xfq commented 2 years ago

I personally don't have a preference, but just FYI - another benefit of Prism is that it is small. I tried downloading custom packages including syntax highlighting for CSS+HTML+HTTP+JavaScript+JSON+XML, and highlight.js is many times bigger than Prism.

svgeesus commented 1 year ago

if Prism has a good community that maintains the software, all the better.

Prism has an active developer community

I like the hljs style more tho... it has better contrast for me.

Prism has multiple themes available, and a theme is just a CSS file so making a new one is pretty easy.

xfq commented 1 year ago

There's also Shiki:

For i18n articles (like this) we use Prism as it's easier to use and is small.