diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sisu/v2/dal_doc_str.rb | 4 | ||||
-rw-r--r-- | lib/sisu/v3/dal_doc_str.rb | 6 |
2 files changed, 7 insertions, 3 deletions
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 |