aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/dal.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2008-08-12 23:37:42 -0400
committerRalph Amissah <ralph@amissah.com>2008-08-12 23:37:42 -0400
commitd43865fb6a093625a77e8605d6fb00158546e1e4 (patch)
tree5386383af935307af234e4389e8c243ee3368f83 /lib/sisu/v0/dal.rb
parentsisu-0.68.0 + sha256 (diff)
html increased use of css; dal, middle layer, url representation, interim commit
Diffstat (limited to 'lib/sisu/v0/dal.rb')
-rw-r--r--lib/sisu/v0/dal.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/sisu/v0/dal.rb b/lib/sisu/v0/dal.rb
index cb6d70f8..cf6d8e09 100644
--- a/lib/sisu/v0/dal.rb
+++ b/lib/sisu/v0/dal.rb
@@ -257,7 +257,7 @@ module SiSU_DAL
when /\^~/ # endnotes
#% Note must do this first (earlier loop) and then enter gathered data into ~^\d+
sub_para=para.dup
- @@endnote_array << sub_para.gsub!(/\n/,'').gsub!(/\^~\s+(.+)\s*/, %{#{Mx[:en_a_o]}#{endnote_no} \\1 #{Mx[:en_a_c]}}).strip
+ @@endnote_array << sub_para.gsub!(/\n/,'').gsub!(/\^~\s+(.+)\s*/,%{#{Mx[:en_a_o]}#{endnote_no} \\1 #{Mx[:en_a_c]}}).strip
endnote_no+=1
para=nil if para =~/\^~ .+/ #removes 'binary' endnote now in endnote array for later insertion
end
@@ -275,9 +275,9 @@ module SiSU_DAL
end
data.each do |para|
para.strip!
- if para =~/\{\s*\S+\.(?:png|jpg|gif)(?:\s*|\s+.+)?\}(?:(?:https?|file|ftp):\S+|image)/
- if para !~/\{\s*\S+\.(?:png|jpg|gif)\s+\d+x\d+\s+/
- m=/\{\s*(\S+\.(?:png|jpg|gif))/
+ if para =~/#{Mx[:lnk_o]}\s*\S+\.(?:png|jpg|gif)(?:\s*|\s+.+)?#{Mx[:lnk_c]}(?:(?:https?|file|ftp):\S+|image)/
+ if para !~/#{Mx[:lnk_o]}\s*\S+\.(?:png|jpg|gif)\s+\d+x\d+\s+/
+ m=/#{Mx[:lnk_o]}\s*(\S+\.(?:png|jpg|gif))/
if @rmgk
imgs=para.scan(m).flatten
images=imgs.each do |image|
@@ -306,7 +306,7 @@ module SiSU_DAL
end
end
para.gsub!(/(#{image})/,"#{image} #{img_col}x#{img_row}")
- else para.gsub!(/\{\s*(\S+)\.(png|jpg|gif).+?\}((?:https?|file|ftp):\S+|image)/,'[ \1 (\2 missing) ]')
+ else para.gsub!(/#{Mx[:lnk_o]}\s*(\S+)\.(png|jpg|gif).+?#{Mx[:lnk_c]}((?:https?|file|ftp):\S+|image)/,'[ \1 (\2 missing) ]')
end
end
else
@@ -317,7 +317,7 @@ module SiSU_DAL
end
end
end
- para.gsub!(/\{\s+(\S+\.(?:png|jpg|gif))\s+/i,'{\1 ') if para =~/\{\s+\S+\.(?:png|jpg|gif).+?\}(?:(?:https?|file|ftp):\S+|image)/
+ para.gsub!(/(#{Mx[:lnk_o]})\s*(\S+\.(?:png|jpg|gif))\s+/i,'\1\2 ') if para =~/#{Mx[:lnk_o]}\s*\S+\.(?:png|jpg|gif).+?#{Mx[:lnk_c]}(?:(?:https?|file|ftp):\S+|image)/
tuned_file << para unless para.nil?
end
tuned_file
@@ -1147,7 +1147,7 @@ module SiSU_DAL
#s=s.gsub(/¡¡\d+¡/,' ') # tables
#s=s.gsub(/¡/,' ') # tables tidy later
#s=s.gsub(/<.+?>/,'')
- s=s.gsub(/\{.+?\.(?:png|jpg|gif).+?\}(?:https?|file|ftp)\\\:\S+ /,' [image] ') # else image names found in search
+ s=s.gsub(/#{Mx[:lnk_o]}.+?\.(?:png|jpg|gif).+?#{Mx[:lnk_c]}(?:https?|file|ftp)\\\:\S+ /,' [image] ') # else image names found in search
s=s.gsub(/\s\s+/,' ')
s=s.strip
end