Syntax highlighting code in proposals
The current styling for code snippets embedded in proposals is pretty good, but it would be really nice to have syntax highlighting. Here is a link to a pretty good library for syntax highlighting.
The current styling for code snippets embedded in proposals is pretty good, but it would be really nice to have syntax highlighting. Here is a link to a pretty good library for syntax highlighting.
5 Comments
While nice to have, it seems like a very low priority addition. Especially since this site isn't focused on development so much, very few questions would use code-snippets.
Agreed. But it doesn't mean it can't live on the to-do list for awhile :)
I've got mixed feelings on this. I, too, like having pretty syntax highlighting. But I'm also wary of including more libraries for displaying this site... especially since I'm not sure there's going to be all that much code actually posted here.
That said, it's not like the site isn't already loading a lot of javascript libraries for its current interface. Hrm. I'll need to think more on this.
I see your point about not wanting to load more libraries, but I don't think this library would make that big of an impact. Currently the site is a about 270KB with all the html, javascript, css and images. However this library is only about 8.7KB (plus an extra 2-3KB to load the extra scripts/css), so it wouldn't be adding that much extra overhead. Plus, with caching the user really only needs to load it once.
I'm less concerned about overhead and more concerned about maintenance. But again, like I said, this site uses a lot of libraries already, so maybe I'm being paranoid.