zmoazeni / gitspective

A different github timeline
http://zmoazeni.github.com/gitspective/
MIT License
346 stars 27 forks source link

parse comments with github-flavoured-markdown #7

Open michaelficarra opened 12 years ago

michaelficarra commented 12 years ago

All the comments (and issue text, and probably others) look ugly because they're not being formatted the way they were intended.

zmoazeni commented 12 years ago

I don't think I'll implement this. I don't know of any GFM javascript libraries and I don't know if I want to maintain one. If you find one, please pass it along.

michaelficarra commented 12 years ago

edit: Also:

zmoazeni commented 12 years ago

I saw that and:

GitHub now has previews on all inputs that use GFM. This live preview should be considered deprecated. It may not render exactly the same way github.com will due to differences in markdown libraries.

michaelficarra commented 12 years ago

Even better! In that case, just have the user's browser "preview" each comment to render it. Just POST to https://github.com/preview with the proper text and repository values. It should return the HTML that you can use to replace the markdown. You can even do it lazily as they enter the viewport.

zmoazeni commented 12 years ago

Oooh. That may work nicely. I may toy with that.

michaelficarra commented 12 years ago

Oooh, it even accepts requests using GET: https://github.com/preview?text=Awesome!%20%237&repository=4257391

tkazec commented 12 years ago

There's also marked, which is extremely fast, compliant, implements GFM, and works on both node and the client side: https://github.com/chjj/marked