diff options
author | Ralph Amissah <ralph@amissah.com> | 2012-12-12 14:58:58 -0500 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2012-12-12 14:58:58 -0500 |
commit | 1beb5aa3c376dbef89bc33024216650529ef7262 (patch) | |
tree | 1682500089c14fd49bcf52a3a001e291fadd5f75 /lib/sisu/v3/manpage.rb | |
parent | debian/changelog (3.3.2-1) (diff) | |
parent | v3: 3.3.3 version & changelog, dates touched (diff) |
Merge tag 'sisu_3.3.3' into debian/sid
Diffstat (limited to 'lib/sisu/v3/manpage.rb')
-rw-r--r-- | lib/sisu/v3/manpage.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/sisu/v3/manpage.rb b/lib/sisu/v3/manpage.rb index d292900c..81f2ed2c 100644 --- a/lib/sisu/v3/manpage.rb +++ b/lib/sisu/v3/manpage.rb @@ -136,9 +136,9 @@ module SiSU_Manpage end notes=@n.flatten notes.each do |e| - util=if e.to_s =~/^\[[\d*+]+\]:/; SiSU_TextUtils::Wrap.new(e.to_s,78,4,1) - else SiSU_TextUtils::Wrap.new(e.to_s,78,0,1) - end + util=(e.to_s =~/^\[[\d*+]+\]:/) \ + ? (SiSU_TextUtils::Wrap.new(e.to_s,78,4,1)) + : (SiSU_TextUtils::Wrap.new(e.to_s,78,0,1)) wrap=util.line_wrap wrap=if wrap =~ /^\s*[\d*+]+\s+.+?\s*\Z/m wrap.gsub(/(^| |#{Mx[:nbsp]}|\s|\*)\\\*/,'\1\\\\\*'). #man page requires @@ -415,7 +415,7 @@ WOK filename_manpage=SiSU_Env::FileOp.new(@md).write_file.manpage @sisu=[] @content.each do |para| # this is a hack - if para.class==Array \ + if para.is_a?(Array) \ and para.length > 0 para.each do |line| line=line.gsub(/\s+$/m,'') |