From af4d5210848dcf656db7b64ca7b71f53cda4214e Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Wed, 30 Mar 2011 23:22:06 -0400 Subject: v2, v3: dal_doc_str.rb, table structure issue * ruby1.9.2 transition related * double spaced empty line creates spurious newline --- lib/sisu/v2/dal_doc_str.rb | 4 +++- lib/sisu/v3/dal_doc_str.rb | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/sisu/v2/dal_doc_str.rb b/lib/sisu/v2/dal_doc_str.rb index 94f668a5..6fd7eff2 100644 --- a/lib/sisu/v2/dal_doc_str.rb +++ b/lib/sisu/v2/dal_doc_str.rb @@ -310,7 +310,9 @@ module SiSU_document_structure_extract t_o=SiSU_document_structure::Object_comment.new.comment(h) #t_o=SiSU_document_structure::Object_layout.new.insert(h) t_o else - if t_o !~/^table\{/ and not t_o.nil? + if t_o !~/^table\{/ \ + and not t_o.nil? + t_o.gsub!(/^\n+/m,'') #check added for ruby 1.9.2 not needed in 1.8 series t_o.gsub!(/\n/m,"#{Mx[:tc_p]}") @rows += t_o + Mx[:tc_c] end diff --git a/lib/sisu/v3/dal_doc_str.rb b/lib/sisu/v3/dal_doc_str.rb index 8da571e4..09635066 100644 --- a/lib/sisu/v3/dal_doc_str.rb +++ b/lib/sisu/v3/dal_doc_str.rb @@ -315,8 +315,10 @@ module SiSU_document_structure_extract t_o=SiSU_document_structure::Object_comment.new.comment(h) #t_o=SiSU_document_structure::Object_layout.new.insert(h) t_o else - if t_o !~/^table\{/ and not t_o.nil? - t_o.gsub!(/\n/m,"#{Mx[:tc_p]}") + if t_o !~/^table\{/ \ + and not t_o.nil? + t_o.gsub!(/^\n+/m,'') #check added for ruby 1.9.2 not needed in 1.8 series (tested in v2) + t_o.gsub!(/\n+/m,"#{Mx[:tc_p]}") @rows += t_o + Mx[:tc_c] end t_o=nil -- cgit v1.2.3