aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/remote.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2007-10-15 19:22:03 +0100
committerRalph Amissah <ralph@amissah.com>2007-10-15 19:25:53 +0100
commit8e092e0f3acc154f60f296419d1fab4d59f65e53 (patch)
treef4cc75bcad883a529fef8924e3edeaa2873064ec /lib/sisu/v0/remote.rb
parentremote_conn, accepting multiple remote hosts, sysenv also beginning of rearra... (diff)
regex matching of images, (and rearrangement of conditionals)
Diffstat (limited to 'lib/sisu/v0/remote.rb')
-rw-r--r--lib/sisu/v0/remote.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/sisu/v0/remote.rb b/lib/sisu/v0/remote.rb
index 2a45e3cb..efa49dc0 100644
--- a/lib/sisu/v0/remote.rb
+++ b/lib/sisu/v0/remote.rb
@@ -113,7 +113,7 @@ module SiSU_Remote
require 'open-uri'
require 'pp'
require "#{SiSU_lib}/composite"
- @rgx_image=/\{\s*(\S+?\.(?:png|jpg|gif))/
+ @rgx_image=/(?:^|[^_\\])\{\s*(\S+?\.(?:png|jpg|gif))/
@rgx_skin=/(?:0~|@)skin:?\s+(\S+)/ #@rgx_skin=/^0~skin\s+(\S+)/
threads=[]
for requested_page in @get_s
@@ -133,10 +133,12 @@ module SiSU_Remote
images << r.scan(@rgx_image).uniq if r =~@rgx_image
downloaded_file << r
end
- if skin and skin.length > 0
+ if skin \
+ and skin.length > 0
SiSU_Assemble::Remote_image.new.download_doc_skin(skin)
end
- if images and images.length > 1
+ if images \
+ and images.length > 1
images.flatten!.uniq!
@msg,@msgs='downloading images:', [ images.join(',') ]
@tell.call.warn unless @opt.cmd =~/q/