From e1ec4bd2dad2bd22ad97cea398ae1cfcfae183a2 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 15 Oct 2007 19:27:16 +0100 Subject: mostly the arrangement of conditionals --- lib/sisu/v0/manpage.rb | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'lib/sisu/v0/manpage.rb') diff --git a/lib/sisu/v0/manpage.rb b/lib/sisu/v0/manpage.rb index 397b94d8..e747e22a 100644 --- a/lib/sisu/v0/manpage.rb +++ b/lib/sisu/v0/manpage.rb @@ -289,10 +289,12 @@ WOK '.BR' << @br << wrapped # [consider s/.BR/.PP/] end end - if @@endnotes[:para] and @@dostype =~/footnote/ #edit out to switch off endnotes following paragraph to which they belong + if @@endnotes[:para] \ + and @@dostype =~/footnote/ #edit out to switch off endnotes following paragraph to which they belong @manpage[:body] << @br @@endnotes[:para].each { |e| @manpage[:body] << e << @br } - elsif @@endnotes[:para] and @@dostype =~/endnote/ + elsif @@endnotes[:para] \ + and @@dostype =~/endnote/ @manpage[:body] << @br*2 end @@endnotes[:para]=[] @@ -387,7 +389,8 @@ WOK @sto=Split_text_object.new(para).lev_segname_para_ocn ### problem in scroll, it appears tables are getting paragraph numbers m=/<~(\d+);(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/ - if para =~m and para=~/\S+/ + if para =~m \ + and para=~/\S+/ para=case @sto.format when /^(1)~(?:(\S+))?/ manpage_structure(para,$1,@sto.ocn,$2) @@ -432,11 +435,14 @@ WOK end elsif para =~/#{table_message}/ @manpage[:body] << para << @br - elsif para =~/(Note|Endnotes?)/ and para !~/<~\d+;(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/ - elsif para =~/(MetaData)/ and para =~/<~(\d+);[um]\d+;\w\d+><#@dp:#@dp>$/ #debug 2003w46 add rc info ####suspect visit + elsif para =~/(Note|Endnotes?)/ \ + and para !~/<~\d+;(?:\w|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/ + elsif para =~/(MetaData)/ \ + and para =~/<~(\d+);[um]\d+;\w\d+><#@dp:#@dp>$/ #debug 2003w46 add rc info ####suspect visit #formatMono=MonoSiSU.new('
MetaData') #para=formatMono.bold_para - elsif para.include? 'Owner Details' and para !~/<~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/ + elsif para.include? 'Owner Details' \ + and para !~/<~(\d+);(?:[oh]|[0-6]:)\d+;\w\d+><#@dp:#@dp>$/ #formatMono=MonoSiSU.new('
Owner Details') #@@manpage[:owner_details]=formatMono.bold_para #para='' @@ -446,7 +452,10 @@ WOK format_text=Format_text_object.new(one,two) para=format_text.seg_no_paranum end - para='' if (para =~// and para =~/^(-\{{2}~\d+|)/) # -endnote + para='' if (para =~// \ + and para =~/^(-\{{2}~\d+|)/) # -endnote + para='' + end case para when /<:i[1-9]>/ if para =~/.*<:#>.*$/m @@ -501,7 +510,8 @@ WOK filename_manpage=SiSU_Env::SiSU_file.new(@md,@md.fn[:manpage]).mkfile_man @sisu=[] @content.each do |para| # this is a hack - if para.class == Array and para.length > 0 + if para.class == Array \ + and para.length > 0 para.each do |line| line.gsub!(/\s+$/m,'') filename_manpage.puts line #unix manpage -- cgit v1.2.3