diff options
author | Ralph Amissah <ralph@amissah.com> | 2013-06-25 00:07:44 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2013-06-25 00:07:44 -0400 |
commit | c25fc2751886278a4e7f30f127e80449160a47f1 (patch) | |
tree | d19cab06d629a995848a296409693b5890d59f60 /lib/sisu/v4/dal_numbering.rb | |
parent | v5: "general code cleaning" fix (diff) |
v4: general code cleaning, sync with v5sisu_4.1.6
Diffstat (limited to 'lib/sisu/v4/dal_numbering.rb')
-rw-r--r-- | lib/sisu/v4/dal_numbering.rb | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/sisu/v4/dal_numbering.rb b/lib/sisu/v4/dal_numbering.rb index 258911d2..c2ac6785 100644 --- a/lib/sisu/v4/dal_numbering.rb +++ b/lib/sisu/v4/dal_numbering.rb @@ -134,11 +134,10 @@ module SiSU_DAL_Numbering input||=@md.make.num_top end num_top=(input ? input.to_i : nil) - t_no1=t_no2=t_no3=t_no4=0 + t_no1=t_no2=t_no3=0 if num_top - no1=num_top; no2=(num_top + 1); no3=(num_top + 2); no4=(num_top + 3) + no1=num_top; no2=(num_top + 1); no3=(num_top + 2) end - t_not=0 chapter_number_counter=0 data=data.compact data.each do |dob| #@md.seg_names << [additions to segment names] @@ -357,8 +356,8 @@ module SiSU_DAL_Numbering elsif @md.pageline.inspect =~/#{m}/ dob_tmp << SiSU_DAL_DocumentStructure::ObjectLayout.new.break(Hx[:br_page_line]) << dob end - para_result=unless dob_tmp.length > 0; dob - else dob_tmp + unless dob_tmp.length > 0; dob + else dob_tmp end else dob end @@ -369,7 +368,7 @@ module SiSU_DAL_Numbering : @segname tags["#{dob.ocn}"]={ segname: @segname } ocn_html_seg[dob.ocn]=if (dob.is==:heading || dob.is==:heading_insert) - x=if dob.ln =~/[1-3]/ + if dob.ln =~/[1-3]/ { seg: nil, level: dob.ln } else #elsif dob.ln =~/[4-6]/ { seg: @seg, level: dob.ln } @@ -384,8 +383,8 @@ module SiSU_DAL_Numbering #@segname=((dob.is=='heading'|| dob.is=='heading_insert') && dob.ln==4 && (defined? dob.name)) \ #? (dob.name) \ #: @segname - dob.tags.each do |x| - tags[x]={ ocn: dob.ocn.to_s, segname: @segname } + dob.tags.each do |y| + tags[y]={ ocn: dob.ocn.to_s, segname: @segname } end end dob @@ -393,7 +392,6 @@ module SiSU_DAL_Numbering ocn_html_seg.each_with_index do |ocn,i| if ocn \ and ocn[:level].to_s=~/[1-3]/ - ocn_seg=nil (1..4).each do |x| if ocn_html_seg[i+x] and ocn_html_seg[i+x][:level]==4 ocn[:seg]=ocn_html_seg[i+x][:seg] |