-
Notifications
You must be signed in to change notification settings - Fork 31
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
Replace pygmentize #2
Comments
If lack of line numbers is the only issue with highlight.js: We could just add that on top, as the line number element is completely separate from the highlighted code anyway. |
I did some work last week on getting pygmentize to highlight css and js blocks inside highlighted html without getting tripped up (even when it doesn't get tripped up, with html only it leaves <script> and <style> without color). It is a bit convoluted atm and needs some serious cleanup, but I'm hoping to get it wrapped up this week. I'm not sure if I looked at that one in detail at the time or if someone else did. I'm happy to take another look. Maybe we could add line number support to it (as you suggest), based on the markup pygmentize has proven to work. |
Okay, can you share what you've got so far? Put it in a branch on the node-pygmentize repo? This issue is currently block a rather big qunitjs.com content update to go live... |
As for perf/speed, I think we should add some smarts to only rebuild files that have changed since the last build based on hashes. And if you want to rebuild all you just run |
I'll see what I can do, yeah |
https://github.com/thlorenz/node-syntaxhighlighter is a wrapper around the robust SyntaxHighlighter library (written in JS) |
pygmentize has some serious issues. For examples, look at http://stage.qunitjs.com/intro/ - the red outlines around various JavaScript symbols are the worst offerenders. But that's not all: Scripts within html blocks don't get highlighted in general, and the detection for JS blocks seems pretty broken, or at least the JS highlighting is abysmal (look for the "Here’s the contents of prettydate.js:" example).
That along with the fact that pygmentize is by far the slowest part of our deploy pipeline should make it worth to find or create a replacement.
The only node module I found so far is highlight.js https://github.com/isagalaev/highlight.js - I think we've looked at that before, and I can't remember what the issue was. Lack of line numbers?
@rdworth any thoughts?
The text was updated successfully, but these errors were encountered: