From f31e286f4a73c5c0f355512b0cb45c6c82088516 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 22 Jun 2013 01:13:46 -0400 Subject: v5: general code cleaning * propagate back to v4 after testing --- lib/sisu/v5/dal_hash_digest.rb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'lib/sisu/v5/dal_hash_digest.rb') diff --git a/lib/sisu/v5/dal_hash_digest.rb b/lib/sisu/v5/dal_hash_digest.rb index 29d8a1ed..9f620aa2 100644 --- a/lib/sisu/v5/dal_hash_digest.rb +++ b/lib/sisu/v5/dal_hash_digest.rb @@ -121,14 +121,13 @@ module SiSU_DAL_Hash end def stamped(t_o,hash_class) #decide what hash information is most useful, is compromise necessary? t_o.obj=SiSU_TextRepresentation::Alter.new(t_o).strip_clean_of_extra_spaces - t_obj=t_o.inspect.sub(/:0x[0-9a-f]{8}\s/,': ') - stripped=SiSU_TextRepresentation::Alter.new(t_o).strip_clean_of_markup - markup=SiSU_TextRepresentation::Alter.new(t_o).semi_revert_markup - digests=SiSU_TextRepresentation::ModifiedTextPlusHashDigest.new(@md,t_o).composite.dgst + #SiSU_TextRepresentation::Alter.new(t_o).strip_clean_of_markup #check + #SiSU_TextRepresentation::Alter.new(t_o).semi_revert_markup #check + #SiSU_TextRepresentation::ModifiedTextPlusHashDigest.new(@md,t_o).composite.dgst #check unless t_o.is==:code case t_o.obj when /#{Mx[:en_a_o]}[\d*+]+\s+.+?#{Mx[:en_a_c]}|#{Mx[:en_b_o]}[*+]\d+\s+.+?#{Mx[:en_b_c]}/m - en_and_t_o,en_and_t_o_digest=[],[] + en_and_t_o_digest=[] t_o.obj=t_o.obj.gsub(/\s*(#{Mx[:en_a_c]}|#{Mx[:en_b_c]})/m,' \1') #watch t_o_plus_en=t_o.obj.scan(/.*?#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}|.*?#{Mx[:en_b_o]}.+?#{Mx[:en_b_c]}/m) t_o_tail=if t_o.obj =~/(?:.*?#{Mx[:en_a_o]}.+?#{Mx[:en_a_c]}|.*?#{Mx[:en_b_o]}.+?#{Mx[:en_b_c]})+([\s\S]+)/m @@ -137,8 +136,7 @@ module SiSU_DAL_Hash end t_o_plus_en << t_o_tail en_and_t_o_digest << endnote_digest(t_o_plus_en) - t_o_new=en_and_t_o_digest.join(' ') - #@tuned << t_o_new + Mx[:id_o] + digest_strip + ':' + digest_all + Mx[:id_c] unless t_o.nil? + en_and_t_o_digest.join(' ') else #@tuned << t_o + Mx[:id_o] + digest_strip + ':' + digest_all + Mx[:id_c] unless t_o.nil? end else #@tuned << t_o + Mx[:id_o] + digest_strip + ':' + digest_all + Mx[:id_c] unless t_o.nil? -- cgit v1.2.3