diff options
Diffstat (limited to 'lib/sisu/v5/manpage.rb')
-rw-r--r-- | lib/sisu/v5/manpage.rb | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/sisu/v5/manpage.rb b/lib/sisu/v5/manpage.rb index 3e430b55..44180819 100644 --- a/lib/sisu/v5/manpage.rb +++ b/lib/sisu/v5/manpage.rb @@ -120,7 +120,6 @@ module SiSU_Manpage @brace_url=SiSU_Viz::Defaults.new.url_decoration @vz=SiSU_Viz::Defaults.new @tab="\t" - @br="\n" @@notes=:end @manpage={ body: [], open: [], close: [], head: [], metadata: [], tail: [], endnotes: [] } end @@ -128,6 +127,9 @@ module SiSU_Manpage manpage=markup(@data) publish(manpage) end + def break_line + "\n" + end # Used for extraction of endnotes from paragraphs def extract_endnotes(dob='') para=dob.obj.gsub(/#{Mx[:br_line]}/,"\n") @@ -176,7 +178,7 @@ GSUB end def manpage_tail @manpage[:tail] <<<<WOK -#{@br} +#{break_line} .TP .SH SEE ALSO sisu(1), @@ -235,21 +237,21 @@ WOK times=wrapped.length times=78 if times > 78 @manpage[:body] << case lv - when 1; '.SH ' << wrapped.upcase << @br << @br - when 2..3; '.SH ' << wrapped.upcase << @br << @br - when 4; '.SH ' << wrapped.upcase << @br << @br - when 5..6; '.SH ' << wrapped.upcase << @br << @br + when 1; '.SH ' << wrapped.upcase << break_line << break_line + when 2..3; '.SH ' << wrapped.upcase << break_line << break_line + when 4; '.SH ' << wrapped.upcase << break_line << break_line + when 5..6; '.SH ' << wrapped.upcase << break_line << break_line end else @manpage[:body] << if wrapped =~/^\.BI\s/ # main text, contents, body KEEP - '.TP' << @br << wrapped.gsub(/(^\.B)I\s/,'\1 ') # sleight ... simpler output (check gsub!) + '.TP' << break_line << wrapped.gsub(/(^\.B)I\s/,'\1 ') # sleight ... simpler output (check gsub!) else - @br + '.BR' + @br << wrapped + break_line + '.BR' + break_line << wrapped end end if @@endnotes[:para] \ and @@notes==:foot #edit out to switch off endnotes following paragraph to which they belong - @@endnotes[:para].each { |e| @manpage[:body] << e << @br } + @@endnotes[:para].each { |e| @manpage[:body] << e << break_line } elsif @@endnotes[:para] \ and @@notes==:end end @@ -349,7 +351,7 @@ WOK manpage_structure(dob) else if dob.obj =~/#{table_message}/ - @manpage[:body] << dob.obj << @br + @manpage[:body] << dob.obj << break_line end end if (dob.obj =~/<a name="n\d+">/ \ |