summaryrefslogtreecommitdiff
path: root/example.rb
diff options
context:
space:
mode:
authorMartin Gütlein <martin.guetlein@gmail.com>2010-01-08 11:23:55 +0100
committerMartin Gütlein <martin.guetlein@gmail.com>2010-01-08 11:23:55 +0100
commit9a743973a913c9d3a92e47f176ee94bc583522a5 (patch)
tree3bd5d5b713ab0cb39ce21806971cd69612b5810c /example.rb
parentdaf2394220af4cafeebe9db2a1177db05579104f (diff)
cosmetics2
Diffstat (limited to 'example.rb')
-rw-r--r--example.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/example.rb b/example.rb
index 6026e5f..90c7ec3 100644
--- a/example.rb
+++ b/example.rb
@@ -33,7 +33,8 @@ class Example
sub.each do |k,v|
res.gsub!(/<#{k}>/,v)
end
- res.gsub!(/\/\//,"/")
+ #replace // that do not have a leading ':'
+ res.gsub!(/[^:]\/\//,"\1/")
res
end