Open michaelficarra opened 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.
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.
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.
Oooh. That may work nicely. I may toy with that.
Oooh, it even accepts requests using GET: https://github.com/preview?text=Awesome!%20%237&repository=4257391
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
All the comments (and issue text, and probably others) look ugly because they're not being formatted the way they were intended.