aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2011-03-30 23:22:06 -0400
committerRalph Amissah <ralph@amissah.com>2011-03-30 23:24:36 -0400
commitaf4d5210848dcf656db7b64ca7b71f53cda4214e (patch)
tree18acfad0e59964dae6727541b8639540d9a278af /lib
parentv2, v3: dal_doc_str, empty line not paragraph object (diff)
v2, v3: dal_doc_str.rb, table structure issue
* ruby1.9.2 transition related * double spaced empty line creates spurious newline
Diffstat (limited to 'lib')
-rw-r--r--lib/sisu/v2/dal_doc_str.rb4
-rw-r--r--lib/sisu/v3/dal_doc_str.rb6
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