-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Syntax highlighting for files (and diffs?) #2
Comments
After an initial look I think I'm leaning towards shjs with sunburst theme shown here. |
That example renders well on my android browser, very nice. Worth noting that shjs is GPLv3. |
Good point, I made a commit that uses google-code-prettify (apache licensed) in the gist source viewer. We can play around and tweak it for now and see how it goes |
Switched to using SyntaxHighlighter as it supports more languages and has a line number column. The downside is where google-code-prettify sniffs for the language, you have to be explicit with SyntaxHighlighter |
Closing now, may revisit if a better solution is found. |
For presenting blobs, gists, etc we need syntax highlighting...
a) use a WebView (the Android Gmail app renders mail messages using a web view) with a syntax-highlighting JavaScript lib. There are lots of these:
http://shjs.sourceforge.net/
https://github.com/alexgorbatchev/SyntaxHighlighter
https://github.com/isagalaev/highlight.js
http://code.google.com/p/google-code-prettify/
http://ace.ajax.org/ - also a code editor...
b) use a Java highlighting library, but there don't seem to be many maintained libraries around:
http://code.google.com/p/jsyntaxpane/
source-grab from Eclipse or Intellij?
Diffs: Of course, personally I'm in love with animated diffs, and it might be hard to combine the animated diff approach with syntax highlighting - maybe only show plain-black-text during transition...
The text was updated successfully, but these errors were encountered: