edgecase / ghpreview

Preview Markdown files (such as a README) exactly how it will appear on Github
MIT License
27 stars 4 forks source link

Html pipeline #3

Closed picandocodigo closed 11 years ago

picandocodigo commented 11 years ago

Modified it to use Github's html-pipeline instead of hitting the API. For some reason, I have to pass the :gfm => false parameter in order to ignore the breaklines from the markdown in the HTML.

adamlogic commented 11 years ago

This is awesome! Please verify the gemspec dependencies, and I will merge.

picandocodigo commented 11 years ago

Yep, I removed it in the first place since I was thinking about a way not to make an HTTP request at all. We could figure out a way to have the correct CSS in the gem maybe, but for the moment I think this is still an improvement since you make just one request for the CSS and don't use an API call to Github.

adamlogic commented 11 years ago

I fetch the CSS links from github since the fingerprint on the URL will change over time. I do cache it for a day, but I'm thinking I'll change it to a week.

Thanks for this!