Re:Posterous adds markdown and syntax highlighting support
by nex3 on Wednesday May 26, 2010 @11:24PM
(#1382580)
I'm surprised they went with CodeRay rather than a more fleshed-out highlighting library. They only list 20 or so supported languages, whereas something like Pygments (which Github uses) supports closer to 100.
[ Parent
| on HN ]
Re:Posterous adds markdown and syntax highlighting support
by twoism on Thursday May 27, 2010 @01:23AM
(#1382774)
Truth is, I picked CodeRay for two reasons. It's fast and it's pure ruby. Pygments is great and I spent some time on a version that used it but CodeRay just fits better within our app. It's pure ruby, supports most languages I thought we should start with, it's extensible and has a roadmap for things that I could see our users asking for.
Re:Posterous adds markdown and syntax highlighting support
by nex3 on Thursday May 27, 2010 @02:00AM
(#1382833)
From a user's perspective, at least, I would think that language coverage would trump most other things when considering different highlighters.
Re:Posterous adds markdown and syntax highlighting support
by patio11 on Thursday May 27, 2010 @04:51AM
(#1383076)
From a user's perspective, if your language is covered, you don't care about that guy on the Internets going all nerdrage on you because you do not support an obscure variant of Cobol with all commands written in romanized Arabic. Language popularity, like popularity for just about everything else, is a zipf distribution. Twenty languages probably covers well in excess of 99% of the people who will actually try to use this.
You can't ever please him, and he's most likely to say "Pah, this isn't exactly what I want, I'm going to roll my own blog."
(P.S.: the hard bitten product manager in me thinks that, from a user's perspective, the user can't program and this feature means nothing to her either way, and every second spent thinking about it is a second the business never gets back.)
Re:Posterous adds markdown and syntax highlighting support
by twoism on Thursday May 27, 2010 @02:29AM
(#1382880)
True. However, working within our architecture and finding a good fit for most use cases was what trumped all else for the feature launch. I like the library we chose and hope it gains traction as a pure ruby highlighting lib but if for some reason it doesn't fit our users needs, we can certainly find a way to accommodate them.
Re:Posterous adds markdown and syntax highlighting support
by scorpion032 on Thursday May 27, 2010 @04:08AM
(#1383021)
Why not just slap in the google code highlighter javascript, if the page contains code. http://code.google.com/p/syntaxhighlighter/
Simpler and cleaner that way.
Re:Posterous adds markdown and syntax highlighting support
by Torn on Thursday May 27, 2010 @06:33AM
(#1383205)
+1. Is there a way for us to userscript / greasemonkey this in in the meantime?
Re:Posterous adds markdown and syntax highlighting support
by greyman on Thursday May 27, 2010 @02:50AM
(#1382907)
Nice. Now please allow ads displaying and your service will be perfect.
Re:Posterous adds markdown and syntax highlighting support
by MrRage on Thursday May 27, 2010 @12:16AM
(#1382656)
So it's more the library they're using? I thought it was strange they support Delphi and Java but not C#.