From dc0648fefb0f43e6432d55d05416a1b38bafeb95 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 10 May 2008 01:38:12 -0400 Subject: addition of a couple of multiline search tags, and minor rearrangement --- lib/sisu/v0/dal.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/sisu/v0/dal.rb') diff --git a/lib/sisu/v0/dal.rb b/lib/sisu/v0/dal.rb index 577c3b9e..c5a07f9c 100644 --- a/lib/sisu/v0/dal.rb +++ b/lib/sisu/v0/dal.rb @@ -663,7 +663,7 @@ module SiSU_DAL @tuned_file=[] object_array=SiSU_document_structure::OCN.new(@md,data).ocn object_array.each do |o| - @tuned_file <<= if o.ocn; "#{o.txt} <~#{o.ocn};#{o.lv};#{o.type}>" + @tuned_file <<= if o.ocn; "#{o.txt} <~#{o.ocn};#{o.lv};#{o.type}>" #main ocn descriptor else o.txt end end @@ -1112,10 +1112,10 @@ module SiSU_DAL if en_plus =~/~\{.+?\}~|~\[.+?\]~/ para_txt,en_open,en_txt,en_close=/(.*?)(~\{|~\[)(.+?)(\}~|\]~)/m.match(en_plus)[1..4] stripped_en=strip_clean_of_markup(en_txt) - if @env.digest.type =~/sha256/ - digest_en_strip=Digest::SHA256.hexdigest(stripped_en) + digest_en_strip=if @env.digest.type =~/sha256/ + Digest::SHA256.hexdigest(stripped_en) else - digest_en_strip=Digest::MD5.hexdigest(stripped_en) + Digest::MD5.hexdigest(stripped_en) end para_txt + en_open + en_txt + '<' + digest_en_strip + '>' + en_close else puts "Error Exception - problem encountered with:\n#{en_plus}" #arbitrary exception, tidy up @@ -1136,7 +1136,7 @@ module SiSU_DAL def strip_clean_of_markup(s) # used for digest, define rules, make same as in db clean #consider: <\/?[ib]>|<(?:\/ )?br>|(.+?)<\/del> s=s.dup - s=s.gsub(/(?:<\/?[ib]>|<~\d+;(?:\w|[0-6]:)\d+;\w\d+>|<#@dp:#@dp>|^[1-6]~\S+|~\{\d+\s.+?\}~)/,'') # markup and endnotes removed + s=s.gsub(/(?:<\/?[ib]>|<~\d+;(?:\w|[0-6]:)\d+;\w\d+>|<#@dp:#@dp>|^[1-6]~\S+|~\{\d+\s.+?\}~)/m,'') # markup and endnotes removed #% same as db clean --> s=s.gsub(/(.+?)<\/del>/,'DELETED(\1)') # deletions s=s.gsub(/(\d+)<\/sup>/,'[\1]') -- cgit v1.2.3