Closed stevenhaddox closed 12 years ago
I did not test it (yet) but by your description it looks like a bug. I will look into it.
I think I found a potential (but not tested yet) fix for this. Changing line 140 of lib/showoff.rb from this:
slide.gsub(/img src=\"(.*?)\"/) do |s|
To this:
slide.gsub(/img src=\"(?!https?:\/\/)(.*?)\"/) do |s|
Seems like it may fix the issue by not doing any path replacements or tweaks to images that have "http://" or "https://" at the beginning of their img src attribute. I haven't figured out how to compile the gem / binary locally yet to verify that it works properly (I did a quick hack by making showoff shell script require ../lib/showoff where I changed the line, but it seems to have some bugs (both with and without my line modification) when loading it that way so I'll need to figure out the right way to create the script locally first before I can properly verify the impact of the changes.
Here's a sample slide that I added to test an external image resource:
!SLIDE center transiton=scrollUp
.notes external image
![cuke](http://farm6.static.flickr.com/5069/5735660296_6708c37b57_b.jpg)
I added it right at the bottom of SlideA.md after the octocat slide.
I use a custom Sinatra wrapper application (presentor) to render a bunch of static presentations from the same subdomain; however, I had issues getting local images within the presentation to find the proper subdomain / subfolder paths to render. I decided to upload my images to Flickr as an easy fix for this.
At first I thought the images not rendering might be related to a missing ImageMagick dependency, but even when I uninstall the RMagick gem and image sizing is disabled I still fail to receive externally hosted images within the presentation.
Here are the main errors (full stack traces below):
With RMagick:
Without RMagick:
I'm hoping this is just a simple setup error on my part, but thought I'd file a bug in case it was something that others can replicate or may be experiencing. It looks like in both cases that neither image reference using an externally hosted image is being set properly.
Here are the stack traces for both errors with RMagick enabled and disabled: