diff options
author | Ralph Amissah <ralph@amissah.com> | 2014-06-19 19:11:16 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2014-06-19 19:11:16 -0400 |
commit | 66b72eae1710087a38e41df6b9168acfe723cae9 (patch) | |
tree | 0169faa8886c19c5626b6a9802d229bea60439cf /lib/sisu/v6/ao_numbering.rb | |
parent | v5 v6: version & changelog (& rakefile) (diff) |
v5 v6: ao, misc, mostly minor cleaning
Diffstat (limited to 'lib/sisu/v6/ao_numbering.rb')
-rw-r--r-- | lib/sisu/v6/ao_numbering.rb | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/sisu/v6/ao_numbering.rb b/lib/sisu/v6/ao_numbering.rb index e04befb0..0dbb1a71 100644 --- a/lib/sisu/v6/ao_numbering.rb +++ b/lib/sisu/v6/ao_numbering.rb @@ -286,7 +286,7 @@ module SiSU_AO_Numbering # numeric only (a number), if # all segments have been named, # the numbers used are over 1000 or - # it is not minded that auto-numbering uses a funny scheme for naming segments (not yet implemented) + # it is not minded that auto-numbering uses a funny scheme for naming segments (not yet implemented) # [for now a warning is printed for such documents on use of maintenance or very-verbose flag] # auto-naming takes the form of giving numbers to segments # the rules for which are as follows @@ -381,13 +381,11 @@ module SiSU_AO_Numbering : @segname tags["#{dob.ocn}"]={ segname: @segname } ocn_html_seg[dob.ocn]=if (dob.is==:heading || dob.is==:heading_insert) - if dob.ln =~/[0-3]/ - { seg: nil, level: dob.ln } - else #elsif dob.ln =~/[4-6]/ - { seg: @seg, level: dob.ln } + if dob.ln =~/[0-3]/ then { seg: nil, level: dob.ln } + #elsif dob.ln =~/[4-6]/ + else { seg: @seg, level: dob.ln } end - else - { seg: @seg, level: nil } + else { seg: @seg, level: nil } end end dob.tags=dob.tags.uniq if defined? dob.tags @@ -406,7 +404,8 @@ module SiSU_AO_Numbering if ocn \ and ocn[:level].to_s=~/[1-3]/ (1..4).each do |x| - if ocn_html_seg[i+x] and ocn_html_seg[i+x][:level]==4 + if ocn_html_seg[i+x] \ + and ocn_html_seg[i+x][:level]==4 ocn[:seg]=ocn_html_seg[i+x][:seg] end end |