eXist-db / documentation

Documentation of eXist
13 stars 44 forks source link

[suggestion] replace highlight.js with prism.js #642

Open line-o opened 3 years ago

line-o commented 3 years ago

Describe the solution you'd like

The bundled apps should use only a single solution to highlight source code. Monex next version will use prism.js to achieve that.

Describe alternatives you've considered

I considered to use highlight.js for Monex as well, but prism.js seems to be more widely used and better maintained.

line-o commented 3 years ago

I am not sold on this. The more I look into both libraries I am not convinced that my initial statement holds. highlight.js has more stars on GitHub

Does someone have more compelling arguments for one the two? speed, features ...

duncdrum commented 3 years ago

The current state of Xquery support in highlight.js is largely due to my contributions. Both libraries are great, and basically head to head. There are still differences in highlighting between the two when it comes to corner cases either one covers some the other doesn’t. The implementations are quite different though.

As a contributor, I prefer the highlight.js workflow and set up. I m curious why you guys choose prism.js. I would be happy to take a look if the Xquery highlighter does something, that highlight.js doesn’t catch or fails to annotate.

joewiz commented 3 years ago

@line-o I agree with your assessment. All of the metrics on GitHub (especially "used by" where prism.js is 217k and highlight.js is 823k) show it's the more widely used project.

@duncdrum Indeed, in terms of XQuery support, prism.js hasn't had any work done since it was added in 2018, whereas highlight.js has had substantive contributions before and since then (and thanks for yours, including the tests!):